Fixes wiki links in [[linkname]] format by changing this to a document link in current directory.
(aOldText)
| 139 | """Add template to specified page object (wikitools).""" |
| 140 | |
| 141 | def fixInternalWikiLinks(aOldText): |
| 142 | """Fixes wiki links in [[linkname]] format by changing this to a document link in current directory.""" |
| 143 | def fixwikilinks(matchobj): |
| 144 | # print 'matcobj0: %s' % matchobj.group(0) |
| 145 | # print 'matcobj1: %s' % matchobj.group(1) |
| 146 | linktext = matchobj.group(1) |
| 147 | linktext = linktext.replace(' ', '-') |
| 148 | # linktext = ':doc:`%s`' % linktext |
| 149 | # use reference for linking as allows pages to be moved around |
| 150 | linktext = ':ref:`%s`' % linktext |
| 151 | # print 'linkdoc: %s' % linktext |
| 152 | logfile.write('linkdoc: %s \n' % linktext) |
| 153 | return linktext |
| 154 | # print 'fixing wiki links' |
| 155 | return re.sub(r'\[\[(.+?)\]\]', fixwikilinks, aOldText) |
| 156 | |
| 157 | def fixWikiCodeMarkupToCodeLinks(aOldText): |
| 158 | """Links "known" code objects if they are found in wiki markup.""" |
no outgoing calls
no test coverage detected