Redirects links pointing to .md files to .html files built from them.
Definition at line 115 of file xrefs.py.
◆ run()
def xrefs._MdLinkFixerTreeprocessor.run |
( |
|
self, |
|
|
|
root |
|
) |
| |
Definition at line 118 of file xrefs.py.
119 for elem in root.iter('a'):
120 href = elem.get('href')
121 if href is None:
122 continue
123 parsed_href = urlparse(href)
124 if parsed_href.path.endswith('.md'):
125 elem.set(
126 'href',
127 parsed_href._replace(path=parsed_href.path[:-3] +
128 '.html').geturl())
129
130
The documentation for this class was generated from the following file:
- third_party/dart-lang/sdk/runtime/tools/wiki/build/xrefs.py