File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -91,19 +91,14 @@ def replace_heading(match: re.Match) -> str:
91
91
def fix_markdown (source_md : str , page : Page , config : MkDocsConfig , files : Files ) -> str :
92
92
if page .file .src_uri in SKIP_FILES + MAN_INDEXES :
93
93
return source_md
94
+ if page .file .name .startswith ("life_cycle-" ):
95
+ source_md = source_md .replace ('<img src="' , '<img src="../' )
94
96
source_md = LINKS_PATTERN .sub (replace_link , source_md )
95
97
source_md = HEADINGS_PATTERN .sub (replace_heading , source_md )
96
98
source_md = f"# { page .file .name } \n " + source_md
97
99
return source_md
98
100
99
-
100
- def fix_img_links (source_md : str , page : Page , config : MkDocsConfig , files : Files ) -> str :
101
- if not page .file .name .startswith ("life_cycle-" ):
102
- return source_md
103
- return source_md .replace ('<img src="' , '<img src="../' )
104
-
105
-
106
- on_page_markdown = plugins .CombinedEvent (fix_markdown , fix_img_links , populate_index_content )
101
+ on_page_markdown = plugins .CombinedEvent (fix_markdown , populate_index_content )
107
102
108
103
109
104
def populate_nav (files : Files ) -> dict [str , list [Link ]]:
You can’t perform that action at this time.
0 commit comments