You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
doc: Fixes to rst converter
This commit is contained in:
@@ -624,6 +624,7 @@ def make_rst_class(node):
|
|||||||
if c.text.strip() != '':
|
if c.text.strip() != '':
|
||||||
s += ' --- ' + rstize_text(c.text.strip(), name)
|
s += ' --- ' + rstize_text(c.text.strip(), name)
|
||||||
f.write(s + '\n')
|
f.write(s + '\n')
|
||||||
|
f.write('\n')
|
||||||
|
|
||||||
# Class description
|
# Class description
|
||||||
descr = node.find('description')
|
descr = node.find('description')
|
||||||
@@ -644,18 +645,18 @@ def make_rst_class(node):
|
|||||||
if match.lastindex == 2:
|
if match.lastindex == 2:
|
||||||
# Doc reference with fragment identifier: emit direct link to section with reference to page, for example:
|
# Doc reference with fragment identifier: emit direct link to section with reference to page, for example:
|
||||||
# `#calling-javascript-from-script in Exporting For Web`
|
# `#calling-javascript-from-script in Exporting For Web`
|
||||||
f.write("- `" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n")
|
f.write("- `" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n")
|
||||||
# Commented out alternative: Instead just emit:
|
# Commented out alternative: Instead just emit:
|
||||||
# `Subsection in Exporting For Web`
|
# `Subsection in Exporting For Web`
|
||||||
# f.write("- `Subsection <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n")
|
# f.write("- `Subsection <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n")
|
||||||
elif match.lastindex == 1:
|
elif match.lastindex == 1:
|
||||||
# Doc reference, for example:
|
# Doc reference, for example:
|
||||||
# `Math`
|
# `Math`
|
||||||
f.write("- :doc:`../" + groups[0] + "`\n")
|
f.write("- :doc:`../" + groups[0] + "`\n\n")
|
||||||
else:
|
else:
|
||||||
# External link, for example:
|
# External link, for example:
|
||||||
# `http://enet.bespin.org/usergroup0.html`
|
# `http://enet.bespin.org/usergroup0.html`
|
||||||
f.write("- `" + link + " <" + link + ">`_\n")
|
f.write("- `" + link + " <" + link + ">`_\n\n")
|
||||||
|
|
||||||
# Property descriptions
|
# Property descriptions
|
||||||
members = node.find('members')
|
members = node.find('members')
|
||||||
|
|||||||
Reference in New Issue
Block a user