equal
deleted
inserted
replaced
683 False |
683 False |
684 """ |
684 """ |
685 return _correctauthorformat.match(author) is not None |
685 return _correctauthorformat.match(author) is not None |
686 |
686 |
687 |
687 |
|
688 def firstline(text): |
|
689 """Return the first line of the input""" |
|
690 try: |
|
691 return text.splitlines()[0] |
|
692 except IndexError: |
|
693 return b'' |
|
694 |
|
695 |
688 def ellipsis(text, maxlength=400): |
696 def ellipsis(text, maxlength=400): |
689 """Trim string to at most maxlength (default: 400) columns in display.""" |
697 """Trim string to at most maxlength (default: 400) columns in display.""" |
690 return encoding.trim(text, maxlength, ellipsis=b'...') |
698 return encoding.trim(text, maxlength, ellipsis=b'...') |
691 |
699 |
692 |
700 |