
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2716 fd906abe-77d9-0310-91a1-e0d9ade77398
35 lines
732 B
Text
35 lines
732 B
Text
==============================
|
|
Yet Another WikiWiki Framework
|
|
==============================
|
|
|
|
($Id$)
|
|
|
|
|
|
Links and Link Management
|
|
=========================
|
|
|
|
>>> from cybertools.wiki.base import link
|
|
|
|
>>> manager = link.LinkManager()
|
|
|
|
>>> input = ('This is text with a [[wikilink Wiki Link]] and a '
|
|
... '`RestructuredText Link <rstxlink>`__')
|
|
|
|
>>> page = object()
|
|
>>> format = link.DoubleBracketLinkFormat(page)
|
|
>>> format.manager = manager
|
|
|
|
>>> format.unmarshall(input)
|
|
'This is text with a [[##0000001##]] and a `RestructuredText Link <rstxlink>`__'
|
|
|
|
>>> link = manager.links['0000001']
|
|
|
|
>>> link.original
|
|
'[[wikilink Wiki Link]]'
|
|
|
|
>>> link.target
|
|
'wikilink'
|
|
|
|
>>> link.label
|
|
'Wiki Link'
|
|
|