mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add support for abbreviations to reST translator (fixes #395).
This commit is contained in:
parent
be2f04f082
commit
636fd6cc38
4 changed files with 39 additions and 4 deletions
|
|
@ -2,3 +2,5 @@ Article title
|
|||
#############
|
||||
|
||||
This is some content. With some stuff to "typogrify".
|
||||
|
||||
Now with added support for :abbr:`TLA (three letter acronym)`.
|
||||
|
|
|
|||
|
|
@ -47,7 +47,9 @@ class RstReaderTest(unittest.TestCase):
|
|||
# unmodified
|
||||
content, _ = readers.read_file(_filename('article.rst'))
|
||||
expected = "<p>This is some content. With some stuff to "\
|
||||
""typogrify".</p>\n"
|
||||
""typogrify".</p>\n<p>Now with added "\
|
||||
'support for <abbr title="three letter acronym">'\
|
||||
'TLA</abbr>.</p>\n'
|
||||
|
||||
self.assertEqual(content, expected)
|
||||
|
||||
|
|
@ -56,7 +58,9 @@ class RstReaderTest(unittest.TestCase):
|
|||
content, _ = readers.read_file(_filename('article.rst'),
|
||||
settings={'TYPOGRIFY': True})
|
||||
expected = "<p>This is some content. With some stuff to "\
|
||||
"“typogrify”.</p>\n"
|
||||
"“typogrify”.</p>\n<p>Now with added "\
|
||||
'support for <abbr title="three letter acronym">'\
|
||||
'TLA</abbr>.</p>\n'
|
||||
|
||||
self.assertEqual(content, expected)
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue