diff --git a/docs/change_log/index.md b/docs/change_log/index.md index 584583ff..ee2445cb 100644 --- a/docs/change_log/index.md +++ b/docs/change_log/index.md @@ -3,6 +3,10 @@ title: Change Log Python-Markdown Change Log ========================= +*under development*: version 3.4.4 (a bug-fix release). + +* Add a special case for initial 's to smarty extension (#1305). + March 23, 2023: version 3.4.3 (a bug-fix release). * Restore console script (#1327). diff --git a/markdown/extensions/smarty.py b/markdown/extensions/smarty.py index 15e57848..f03169e0 100644 --- a/markdown/extensions/smarty.py +++ b/markdown/extensions/smarty.py @@ -139,7 +139,7 @@ # Single closing quotes: closingSingleQuotesRegex = r"(?<=%s)'(?!\s|s\b|\d)" % closeClass -closingSingleQuotesRegex2 = r"(?<=%s)'(\s|s\b)" % closeClass +closingSingleQuotesRegex2 = r"'(\s|s\b)" # All remaining quotes should be opening ones remainingSingleQuotesRegex = r"'" diff --git a/tests/test_syntax/extensions/test_smarty.py b/tests/test_syntax/extensions/test_smarty.py index f2d074dd..aeb09884 100644 --- a/tests/test_syntax/extensions/test_smarty.py +++ b/tests/test_syntax/extensions/test_smarty.py @@ -64,6 +64,10 @@ def test_basic(self): '"Ellipsis within quotes..."', '
“Ellipsis within quotes…”
' ) + self.assertMarkdownRenders( + "*Custer*'s Last Stand", + "Custer’s Last Stand
" + ) def test_years(self): self.assertMarkdownRenders("1440--80's", '1440–80’s
')