Links "known" code objects if they are found in wiki markup.
(aOldText)
| 155 | return re.sub(r'\[\[(.+?)\]\]', fixwikilinks, aOldText) |
| 156 | |
| 157 | def fixWikiCodeMarkupToCodeLinks(aOldText): |
| 158 | """Links "known" code objects if they are found in wiki markup.""" |
| 159 | def fixcodemarkuplinks(matchobj): |
| 160 | # print 'Inline code: %s' % matchobj.group(0) |
| 161 | # print 'matcobj1: %s' % matchobj.group(1) |
| 162 | temp_set_of_codemarkup.add(matchobj.group(0)) |
| 163 | linktext = matchobj.group(1) |
| 164 | if linktext in mapped_wiki_inline_code: |
| 165 | logfile.write('Replace: %s \n' % mapped_wiki_inline_code[linktext]) |
| 166 | return mapped_wiki_inline_code[linktext] |
| 167 | |
| 168 | return matchobj.group(0) # linktext |
| 169 | # print 'fixing up code markup to code reference' |
| 170 | return re.sub(r'``(.+?)``', fixcodemarkuplinks, aOldText) |
| 171 | |
| 172 | for file in os.listdir(output_dir): |
| 173 | if file.endswith(".rst"): |
no outgoing calls
no test coverage detected