mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #285 from yumike/summary_markup
Fix markup for single-paragraph summary in reST metadata
This commit is contained in:
commit
3cabdb2dbf
2 changed files with 7 additions and 2 deletions
|
|
@ -43,6 +43,10 @@ class Reader(object):
|
|||
|
||||
class _FieldBodyTranslator(HTMLTranslator):
|
||||
|
||||
def __init__(self, document):
|
||||
HTMLTranslator.__init__(self, document)
|
||||
self.compact_p = None
|
||||
|
||||
def astext(self):
|
||||
return ''.join(self.body)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,9 @@ class RstReaderTest(unittest.TestCase):
|
|||
'category': 'yeah',
|
||||
'author': u'Alexis Métaireau',
|
||||
'title': 'This is a super article !',
|
||||
'summary': 'Multi-line metadata should be supported\nas well as'\
|
||||
' <strong>inline markup</strong>.',
|
||||
'summary': u'<p class="first last">Multi-line metadata should be'\
|
||||
u' supported\nas well as <strong>inline'\
|
||||
u' markup</strong>.</p>\n',
|
||||
'date': datetime.datetime(2010, 12, 2, 10, 14),
|
||||
'tags': ['foo', 'bar', 'foobar'],
|
||||
'custom_field': 'http://notmyidea.org',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue