mirror of
https://projects.blender.org/infrastructure/gitea-custom.git
synced 2024-12-21 23:03:13 -05:00
Fix some unecessary Sphinx warnings in RST preview
This commit is contained in:
parent
624cd22f38
commit
af8f0edfc8
1 changed files with 6 additions and 3 deletions
|
@ -70,10 +70,10 @@ with tempfile.TemporaryDirectory() as tmp_dir:
|
||||||
return f"image:: {image_url}/{matchobj.group(1).strip('/')}"
|
return f"image:: {image_url}/{matchobj.group(1).strip('/')}"
|
||||||
|
|
||||||
page_contents = re.sub(":doc:`/(.+?)`", doc_link, page_contents)
|
page_contents = re.sub(":doc:`/(.+?)`", doc_link, page_contents)
|
||||||
page_contents = re.sub(":doc:`(.+?)<(.+?)>`", doc_label_link, page_contents)
|
page_contents = re.sub(":doc:`([\w\s\n-]+?)\n?<(.+?)>`", doc_label_link, page_contents)
|
||||||
page_contents = re.sub(":ref:`(.+?)<(.+?)>`", ref_label_link, page_contents)
|
page_contents = re.sub(":ref:`([\w\s\n-]+?)\n?<(.+?)>`", ref_label_link, page_contents)
|
||||||
page_contents = re.sub(":ref:`([\w\s-]+?)`", ref_link, page_contents)
|
page_contents = re.sub(":ref:`([\w\s-]+?)`", ref_link, page_contents)
|
||||||
page_contents = re.sub(":term:`(.+?)<(.+?)>`", term_link, page_contents)
|
page_contents = re.sub(":term:`([\w\s\n-]+?)\n?<(.+?)>`", term_link, page_contents)
|
||||||
page_contents = re.sub(":term:`([\w\s-]+?)`", term_link, page_contents)
|
page_contents = re.sub(":term:`([\w\s-]+?)`", term_link, page_contents)
|
||||||
page_contents = re.sub("figure:: (.+?)", figure_link, page_contents)
|
page_contents = re.sub("figure:: (.+?)", figure_link, page_contents)
|
||||||
page_contents = re.sub("image:: (.+?)", image_link, page_contents)
|
page_contents = re.sub("image:: (.+?)", image_link, page_contents)
|
||||||
|
@ -87,6 +87,9 @@ with tempfile.TemporaryDirectory() as tmp_dir:
|
||||||
page_contents = re.sub("literalinclude::(.*)", include_directive, page_contents)
|
page_contents = re.sub("literalinclude::(.*)", include_directive, page_contents)
|
||||||
page_contents = re.sub("include::(.*)", include_directive, page_contents)
|
page_contents = re.sub("include::(.*)", include_directive, page_contents)
|
||||||
page_contents = re.sub("raw::(.*)", raw_directive, page_contents)
|
page_contents = re.sub("raw::(.*)", raw_directive, page_contents)
|
||||||
|
page_contents = re.sub(".. toctree::(.*)", ".. code-block:: none", page_contents)
|
||||||
|
page_contents = re.sub(":maxdepth:(.*)", "", page_contents)
|
||||||
|
page_contents = page_contents.replace("|BLENDER_VERSION|", "BLENDER_VERSION")
|
||||||
|
|
||||||
page_filepath.write_text(page_contents)
|
page_filepath.write_text(page_contents)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue