sphinxdirective: allow commented blocks (#10720)

* sphinxdirective: allow commented blocks

* minor correction
This commit is contained in:
Nikolay Tyukaev authored and GitHub committed 2022-03-01 22:11:37 +03:00
1 parent 5e023ebdd9
commit 81cd9d86d1
2 files changed
+11 -1

No files matched your search

+8
View File
@@ -71,6 +71,13 @@ class DoxyMDFilter:
rel_path = os.path.relpath(link_path, self.input_dir).replace('\\', '/')
self.content = self.content.replace(link, rel_path)
def remove_comment_block_sphinxdirective(self):
"""
Remove comment blocks from `sphinxdirective`
"""
self.content = re.sub(r'\<\!\-\-\s*?\@sphinxdirective', '@sphinxdirective', self.content)
self.content = re.sub(r'\@endsphinxdirective\s*?\-\-\>', '@endsphinxdirective', self.content)
def copy_images(self):
"""
Go through image links and copy them into output_folder
@@ -97,6 +104,7 @@ class DoxyMDFilter:
Do all processing operations on a markdown file
"""
self.replace_image_links()
self.remove_comment_block_sphinxdirective()
self.replace_md_links()
self.copy_markdown()
self.copy_images()