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

+3 -1
View File
@@ -907,7 +907,9 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE =
EXCLUDE = "@OpenVINO_SOURCE_DIR@/thirdparty" \
"@OpenVINO_SOURCE_DIR@/temp" \
"@OpenVINO_SOURCE_DIR@/bin"
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
+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()