sphinxdirective: allow commented blocks (#10720)

* sphinxdirective: allow commented blocks

* minor correction
This commit is contained in:
Nikolay Tyukaev 2022-03-01 22:11:37 +03:00 committed by GitHub
parent 5e023ebdd9
commit 81cd9d86d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

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

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()