mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-102507 Remove invisible pagebreak characters (#102531)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
parent
401d7a7f00
commit
b097925858
16 changed files with 6 additions and 45 deletions
|
|
@ -174,7 +174,6 @@ DEFAULTKEYWORDS = ', '.join(default_keywords)
|
|||
EMPTYSTRING = ''
|
||||
|
||||
|
||||
|
||||
# The normal pot-file header. msgmerge and Emacs's po-mode work better if it's
|
||||
# there.
|
||||
pot_header = _('''\
|
||||
|
|
@ -196,7 +195,7 @@ msgstr ""
|
|||
|
||||
''')
|
||||
|
||||
|
||||
|
||||
def usage(code, msg=''):
|
||||
print(__doc__ % globals(), file=sys.stderr)
|
||||
if msg:
|
||||
|
|
@ -204,7 +203,6 @@ def usage(code, msg=''):
|
|||
sys.exit(code)
|
||||
|
||||
|
||||
|
||||
def make_escapes(pass_nonascii):
|
||||
global escapes, escape
|
||||
if pass_nonascii:
|
||||
|
|
@ -258,7 +256,7 @@ def normalize(s, encoding):
|
|||
s = '""\n"' + lineterm.join(lines) + '"'
|
||||
return s
|
||||
|
||||
|
||||
|
||||
def containsAny(str, set):
|
||||
"""Check whether 'str' contains ANY of the chars in 'set'"""
|
||||
return 1 in [c in str for c in set]
|
||||
|
|
@ -307,7 +305,7 @@ def getFilesForName(name):
|
|||
|
||||
return []
|
||||
|
||||
|
||||
|
||||
class TokenEater:
|
||||
def __init__(self, options):
|
||||
self.__options = options
|
||||
|
|
@ -515,7 +513,6 @@ class TokenEater:
|
|||
print('msgstr ""\n', file=fp)
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
global default_keywords
|
||||
try:
|
||||
|
|
@ -675,7 +672,7 @@ def main():
|
|||
if closep:
|
||||
fp.close()
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
# some more test strings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue