[tor-commits] [tor/master] format_changelog.py: tweak hyphenation rules
nickm at torproject.org
nickm at torproject.org
Sun Oct 19 16:59:28 UTC 2014
commit 29b0e82b5a0e5c3f8b0911a9bbbf55237ae64cca
Author: Nick Mathewson <nickm at torproject.org>
Date: Sun Oct 19 12:57:57 2014 -0400
format_changelog.py: tweak hyphenation rules
Mark all our generated command names, and anything with a
double-hyphen, as unhyphenatable.
---
scripts/maint/format_changelog.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/maint/format_changelog.py b/scripts/maint/format_changelog.py
index c84bf3c..6b4e757 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)
More information about the tor-commits
mailing list