Skip to content

Commit

Permalink
#75 documentation simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
hkir-dev committed Jul 8, 2021
1 parent f8a412a commit 0d2d374
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 11 deletions.
9 changes: 8 additions & 1 deletion src/dosdp/document/schema/schema_create_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ def print_element(element, md_out, plain_doc, prefix="", nesting_list=[], in_ref
# md_out.write("%s\n" % (indentation + line))
if (DEFINITION_PREFIX + referred_element) not in nesting_list:
print_element(DEFINITION_PREFIX + referred_element, md_out, plain_doc,
"" if len(nesting_list) == 1 else " " + indentation, nesting_list)
"" if len(nesting_list) == 1 else indentation + " ", nesting_list)
else:
# ellipsis to indicate recursion
md_out.write("%s\n" % (indentation + " " * (len(line) - len(line.lstrip())) + " - ..."))
else:
is_annotation = False
if not (element.startswith(DEFINITION_PREFIX) and count == 0 and not in_reference) \
Expand All @@ -240,6 +243,10 @@ def print_element(element, md_out, plain_doc, prefix="", nesting_list=[], in_ref
md_out.write("\n")
print_element(element, md_out, plain_doc,
prefix if prefix.startswith(">") else ">" + prefix, nesting_list, in_reference=True)
else:
# ellipsis to indicate recursion
line_content = reference.replace(">", "")
md_out.write("%s\n" % (indentation + " " * (len(line_content) - len(line_content.lstrip())) + " - ..."))


def customize_doc_content(line):
Expand Down
Loading

0 comments on commit 0d2d374

Please sign in to comment.