Skip to content

Commit 3085208

Browse files
committed
Add fancy double quote to punctuation
This allows “ in text to be capitalised.
1 parent 98a7b71 commit 3085208

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

titlecase/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
__version__ = '0.12.0'
1818

1919
SMALL = 'a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v\.?|via|vs\.?'
20-
PUNCT = r"""!"#$%&'‘()*+,\-–‒—―./:;?@[\\\]_`{|}~"""
20+
PUNCT = r"""!"#$%&'‘()*+,\-–‒—―./:;?@[\\\]_`{|}~"""
2121

2222
SMALL_WORDS = re.compile(r'^(%s)$' % SMALL, re.I)
2323
INLINE_PERIOD = re.compile(r'[a-z][.][a-z]', re.I)

titlecase/tests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,11 @@
259259
(
260260
"‘QUOTE’ A GREAT",
261261
"‘Quote’ a Great",
262-
)
262+
),
263+
(
264+
"“YOUNG AND RESTLESS”",
265+
"“Young and Restless”",
266+
),
263267
)
264268

265269

0 commit comments

Comments
 (0)