Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
xrefs._MdLinkFixerTreeprocessor Class Reference
Inheritance diagram for xrefs._MdLinkFixerTreeprocessor:

Public Member Functions

 run (self, root)
 

Detailed Description

Redirects links pointing to .md files to .html files built from them.

Definition at line 115 of file xrefs.py.

Member Function Documentation

◆ run()

xrefs._MdLinkFixerTreeprocessor.run (   self,
  root 
)

Definition at line 118 of file xrefs.py.

118 def run(self, root):
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
Definition run.py:1

The documentation for this class was generated from the following file: