mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Improved generated docs formatting.
This commit is contained in:
parent
0836e821f4
commit
c7d0be8ba5
1 changed files with 5 additions and 4 deletions
|
@ -355,7 +355,7 @@ class LeafNode(object):
|
|||
argname = argname.strip()
|
||||
argdesc = argdesc.strip()
|
||||
self.arguments.append([argname, argdesc])
|
||||
if line.startswith("Extra Anchors:"):
|
||||
if line.startswith("Extra Anchors:") or line.startswith("Anchors:"):
|
||||
lines, block = get_comment_block(lines, prefix)
|
||||
for line in block:
|
||||
if "=" not in line:
|
||||
|
@ -388,16 +388,17 @@ class LeafNode(object):
|
|||
out = []
|
||||
if self.name:
|
||||
out.append("### " + mkdn_esc(self.name))
|
||||
out.append("**Type:** {0}".format(mkdn_esc(self.leaftype.replace("&","/"))))
|
||||
out.append("")
|
||||
if self.status:
|
||||
out.append("**{0}**".format(mkdn_esc(self.status)))
|
||||
out.append("")
|
||||
for title, usages in self.usages:
|
||||
if not title:
|
||||
title = "Usage"
|
||||
out.append("**{0}**:".format(mkdn_esc(title)))
|
||||
title = ""
|
||||
out.append("**Usage:** {0}".format(mkdn_esc(title)))
|
||||
for usage in usages:
|
||||
out.append("- {0}".format(mkdn_esc(usage)))
|
||||
out.append("- ${0}$".format(mkdn_esc(usage)))
|
||||
out.append("")
|
||||
if self.description:
|
||||
out.append("**Description**:")
|
||||
|
|
Loading…
Reference in a new issue