diff --git a/docs/changelog.md b/docs/changelog.md index 29ff8d31..fe5aca58 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Ensure `
He said, "'Quoted' words in a larger quote."
doubleQuoteSetsRe = r""""'(?=\w)""" singleQuoteSetsRe = r"""'"(?=\w)""" +doubleQuoteSetsRe2 = r'(?<=%s)\'"' % closeClass +singleQuoteSetsRe2 = r"(?<=%s)\"'" % closeClass # Special case for decade abbreviations (the '80s): decadeAbbrRe = r"(? None: (doubleQuoteStartRe, (rdquo,)), (doubleQuoteSetsRe, (ldquo + lsquo,)), (singleQuoteSetsRe, (lsquo + ldquo,)), + (doubleQuoteSetsRe2, (rsquo + rdquo,)), + (singleQuoteSetsRe2, (rdquo + rsquo,)), (decadeAbbrRe, (rsquo,)), (openingSingleQuotesRegex, (1, lsquo)), (closingSingleQuotesRegex, (rsquo,)), diff --git a/tests/test_syntax/extensions/test_smarty.py b/tests/test_syntax/extensions/test_smarty.py index 0228ddf0..03585517 100644 --- a/tests/test_syntax/extensions/test_smarty.py +++ b/tests/test_syntax/extensions/test_smarty.py @@ -44,6 +44,22 @@ def test_basic(self): '\'Quoted "words" in a larger quote.\'', '‘Quoted “words” in a larger quote.’
' ) + self.assertMarkdownRenders( + '"Quoted words at the \'end.\'"', + '“Quoted words at the ‘end.’”
' + ) + self.assertMarkdownRenders( + '\'Quoted words at the "end."\'', + '‘Quoted words at the “end.”’
' + ) + self.assertMarkdownRenders( + '(He replied, "She said \'Hello.\'")', + '(He replied, “She said ‘Hello.’”)
' + ) + self.assertMarkdownRenders( + 'He replied, "She said \'Hello.\'"', + 'He replied, “She said ‘Hello.’”
' + ) self.assertMarkdownRenders( '"quoted" text and **bold "quoted" text**', '“quoted” text and bold “quoted” text
'