handle toc and anchorlink
This commit is contained in:
parent
fc6886b4b4
commit
4784fc2080
2 changed files with 13 additions and 5 deletions
|
@ -177,11 +177,8 @@ class Formatter(FormatterBase):
|
|||
return ''
|
||||
|
||||
def anchorlink(self, on, name='', **kw):
|
||||
id = kw.get('id',None)
|
||||
extra = ''
|
||||
if id:
|
||||
extra = ' id="%s"' % id
|
||||
return ('<link anchor="%s"%s>' % (name, extra) ,'</link>') [not on]
|
||||
# kw.id not supported, we hope the anchor matches existing heading on page
|
||||
return ('[[#', ']]') [not on]
|
||||
|
||||
def underline(self, on, **kw):
|
||||
return ['__', '__'][not on]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue