+2004-04-19 José Matos <jamatos@lyx.orrg>
+ * parser_tools.py (chain): fix the detection of the last format for
+ revertions.
+
2004-04-19 Martin Vermeer <martin.vermeer@hut.fi>
* lyx_1_4.py (convert_frameless_box): Replace instead of adding
new code.
steps.append(step[0])
else:
mode = "revert"
- for step in format_relation:
+ relation_format = format_relation
+ relation_format.reverse()
+ last_step = None
+
+ for step in relation_format:
if final_step <= step[0] <= initial_step:
- steps.insert(0, step[0])
+ steps.append(step[0])
+ last_step = step
- if step[1][-1:] == opt.end:
- del steps[0]
+ if last_step[1][-1] == opt.end:
+ steps.pop()
return mode, steps