Skip to content
Snippets Groups Projects
Commit be9f62ad authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[docgen][code_to_md] avoid newline at beginning/end of code blocks

parent 98f5d69d
No related branches found
No related tags found
2 merge requests!1915Feature/modify python examples docgen,!1914[examples] Implement Python-only doc generator using pyparsing
......@@ -14,8 +14,8 @@ def parseTaggedContent(keyname, action, open="[[", close="]]", endTag="/"):
"""
Match content between [[keyname]] and [[/keyname]] and apply the action on it
"""
start = LineStart() + ZeroOrMore(" ") + "//" + ZeroOrMore(" ") + Literal(open + str(keyname) + close)
end = LineStart() + ZeroOrMore(" ") + "//" + ZeroOrMore(" ") + Literal(open + endTag + str(keyname) + close)
start = LineStart() + ZeroOrMore(" ") + "//" + ZeroOrMore(" ") + Literal(open + str(keyname) + close) + LineEnd()
end = LineStart() + ZeroOrMore(" ") + "//" + ZeroOrMore(" ") + Literal(open + endTag + str(keyname) + close) + LineEnd()
return start.suppress() + SkipTo(end).setParseAction(action) + end.suppress()
def createMarkdownCode(markDownToken):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment