fix heading formatting
This commit is contained in:
parent
9476b4d684
commit
9be54dc368
1 changed files with 5 additions and 5 deletions
|
@ -142,13 +142,13 @@ class Formatter(FormatterBase):
|
||||||
return ['\n', '\\\n'][not preformatted]
|
return ['\n', '\\\n'][not preformatted]
|
||||||
|
|
||||||
def heading(self, on, depth, **kw):
|
def heading(self, on, depth, **kw):
|
||||||
|
# heading depth reversed in dokuwiki
|
||||||
|
heading_depth = 7 - depth
|
||||||
|
|
||||||
if on:
|
if on:
|
||||||
self._text = []
|
return u'%s ' % (u'=' * heading_depth)
|
||||||
return '\n\n'
|
|
||||||
else:
|
else:
|
||||||
result = u'\n%s\n\n' % (u'=' * len("".join(self._text)))
|
return u' %s' % (u'=' * heading_depth)
|
||||||
self._text = None
|
|
||||||
return result
|
|
||||||
|
|
||||||
def table(self, on, attrs={}, **kw):
|
def table(self, on, attrs={}, **kw):
|
||||||
return ['<table>', '</table>'][not on]
|
return ['<table>', '</table>'][not on]
|
||||||
|
|
Loading…
Reference in a new issue