From 81cd9d86d12293d1c2fe4da77f6641d674ba0307 Mon Sep 17 00:00:00 2001 From: Nikolay Tyukaev Date: Tue, 1 Mar 2022 22:11:37 +0300 Subject: [PATCH] sphinxdirective: allow commented blocks (#10720) * sphinxdirective: allow commented blocks * minor correction --- docs/Doxyfile.config | 4 +++- docs/scripts/doxy_md_filter.py | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/Doxyfile.config b/docs/Doxyfile.config index 056f005fc73..3ee9ead3cb5 100644 --- a/docs/Doxyfile.config +++ b/docs/Doxyfile.config @@ -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 diff --git a/docs/scripts/doxy_md_filter.py b/docs/scripts/doxy_md_filter.py index 59219ed6b2e..4ed1b50196f 100644 --- a/docs/scripts/doxy_md_filter.py +++ b/docs/scripts/doxy_md_filter.py @@ -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()