diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-10-19 12:57:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-10-19 12:57:57 -0400 |
commit | 29b0e82b5a0e5c3f8b0911a9bbbf55237ae64cca (patch) | |
tree | 7d841cdc6fbb5157cf5eaf40d5a82ec8a09406a1 /scripts/maint/format_changelog.py | |
parent | 45f534e6df6f576f7721f7aa81bf86265477c838 (diff) | |
download | tor-29b0e82b5a0e5c3f8b0911a9bbbf55237ae64cca.tar.gz tor-29b0e82b5a0e5c3f8b0911a9bbbf55237ae64cca.zip |
format_changelog.py: tweak hyphenation rules
Mark all our generated command names, and anything with a
double-hyphen, as unhyphenatable.
Diffstat (limited to 'scripts/maint/format_changelog.py')
-rwxr-xr-x | scripts/maint/format_changelog.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/maint/format_changelog.py b/scripts/maint/format_changelog.py index c84bf3ccf4..6b4e757345 100755 --- a/scripts/maint/format_changelog.py +++ b/scripts/maint/format_changelog.py @@ -34,6 +34,9 @@ import optparse NO_HYPHENATE=set(""" pf-divert +tor-resolve +tor-gencert +tor-fw-helper """.split()) LASTLINE_UNDERFLOW_EXPONENT = 1 @@ -117,6 +120,9 @@ def wrap_graf(words, prefix_len1=0, prefix_len2=0, width=72): return lines def hyphenateable(word): + if "--" in word: + return False + if re.match(r'^[^\d\-]\D*-', word): stripped = re.sub(r'^\W+','',word) stripped = re.sub(r'\W+$','',word) |