mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-09 23:26:59 +02:00
[docs] commenting custom extensions
This commit is contained in:
parent
e63b06a3b9
commit
f3bed081bd
4 changed files with 39 additions and 3 deletions
|
@ -1,7 +1,12 @@
|
|||
# Utility functions for custom Sphinx extensions
|
||||
|
||||
from myst_parser.docutils_ import Parser
|
||||
from myst_parser.mdit_to_docutils.base import make_document
|
||||
|
||||
|
||||
# Given a string written in markdown
|
||||
# parse its content
|
||||
# and return the corresponding docutils document
|
||||
def md_to_docutils(text):
|
||||
parser = Parser()
|
||||
doc = make_document(parser_cls=Parser)
|
||||
|
@ -9,6 +14,9 @@ def md_to_docutils(text):
|
|||
return doc
|
||||
|
||||
|
||||
# Given a docutils node
|
||||
# find an attribute that corresponds to a link (if it exists)
|
||||
# and return its key
|
||||
def get_link_key(node):
|
||||
link_keys = ['uri', 'refuri', 'refname']
|
||||
for key in link_keys:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue