Commit a5742e9c authored by john's avatar john

fixed another bug in ST

parent 12bb20e5
...@@ -232,6 +232,12 @@ def StructuredText(paragraphs): ...@@ -232,6 +232,12 @@ def StructuredText(paragraphs):
current_level = find_level(levels,indent) current_level = find_level(levels,indent)
current_indent = indent current_indent = indent
run,numbers = runner(struct,top,current_level,numbers) run,numbers = runner(struct,top,current_level,numbers)
tmp = {}
K = levels.keys()
for key in K:
if key <= current_level:
tmp[key] = levels[key]
levels = tmp
elif levels[current_level] > indent and levels[l] < indent: elif levels[current_level] > indent and levels[l] < indent:
levels[current_level] = indent levels[current_level] = indent
current_indent = indent current_indent = indent
...@@ -239,6 +245,7 @@ def StructuredText(paragraphs): ...@@ -239,6 +245,7 @@ def StructuredText(paragraphs):
current_level = l current_level = l
else: else:
tmp = {} tmp = {}
j = 0
for i in range(current_level): for i in range(current_level):
if indent > levels[i]: if indent > levels[i]:
tmp[i] = levels[i] tmp[i] = levels[i]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment