diff --git a/examples/convert_code_to_doc.py b/examples/convert_code_to_doc.py index 69305d8de9b787a34597821a2882d033ad9dd400..80db041164e36bbbe62d3d5b7bc73fb44b04f407 100755 --- a/examples/convert_code_to_doc.py +++ b/examples/convert_code_to_doc.py @@ -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):