mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
format_changelog.py: tweak hyphenation rules
Mark all our generated command names, and anything with a double-hyphen, as unhyphenatable.
This commit is contained in:
parent
45f534e6df
commit
29b0e82b5a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user