mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-07 07:56:42 +02:00
Improved documentation generation for arguments.
This commit is contained in:
@@ -574,12 +574,13 @@ class LeafNode(object):
|
|||||||
for line in block:
|
for line in block:
|
||||||
out.append(mkdn_esc(line))
|
out.append(mkdn_esc(line))
|
||||||
out.append("")
|
out.append("")
|
||||||
if self.arguments:
|
if self.arguments or self.named_arguments:
|
||||||
out.append("**Arguments:**")
|
out.append("**Arguments:**")
|
||||||
|
if self.arguments:
|
||||||
out.append('<abbr title="These args can be used by position or by name.">By Position</abbr> | What it does')
|
out.append('<abbr title="These args can be used by position or by name.">By Position</abbr> | What it does')
|
||||||
out.append("---------------- | ------------------------------")
|
out.append("---------------- | ------------------------------")
|
||||||
for argname, argdesc in self.arguments:
|
for argname, argdesc in self.arguments:
|
||||||
argname = argname.replace(" / ", "` / `")
|
argname = " / ".join("`{}`".format(x.strip()) for x in argname.replace("|","/").split("/"))
|
||||||
out.append(
|
out.append(
|
||||||
"{0:15s} | {1}".format(
|
"{0:15s} | {1}".format(
|
||||||
"`{0}`".format(argname),
|
"`{0}`".format(argname),
|
||||||
@@ -591,7 +592,7 @@ class LeafNode(object):
|
|||||||
out.append('<abbr title="These args must be used by name, ie: name=value">By Name</abbr> | What it does')
|
out.append('<abbr title="These args must be used by name, ie: name=value">By Name</abbr> | What it does')
|
||||||
out.append("-------------- | ------------------------------")
|
out.append("-------------- | ------------------------------")
|
||||||
for argname, argdesc in self.named_arguments:
|
for argname, argdesc in self.named_arguments:
|
||||||
argname = argname.replace(" / ", "` / `")
|
argname = " / ".join("`{}`".format(x.strip()) for x in argname.replace("|","/").split("/"))
|
||||||
out.append(
|
out.append(
|
||||||
"{0:15s} | {1}".format(
|
"{0:15s} | {1}".format(
|
||||||
"`{0}`".format(argname),
|
"`{0}`".format(argname),
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,538];
|
BOSL_VERSION = [2,0,539];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
Reference in New Issue
Block a user