-
Type:
Bug
-
Resolution: Fixed
-
None
-
Affects Version/s: None
-
Component/s: Import/Export
-
Emptyshow more show less
The Problem was discovered for the following segment:
TEXT deaktivieren lassen.<NL x="1" g="2"><br /></NL><NL x="2" g="3"><WS type="n"/></NL>
Currently the method editor_Models_Import_FileParser_Transit::splitSegment splits the content sequentially in the following order:
SubSeg, /SubSeg, Tag, FontTag, WS (Single Tag!), NL, NU, Tab
That means, that the segment is split up at the WS Tag, and breaks apart the surrounding NL Tag, which then can not be recognized by the used regex anymore. This results in an "If tagName is present, parts should always be bigger than 1" error, out of the same method (because the strpos founds a tag part).
For the above example this could be fixed by changing the tag resolving order to:
SubSeg, /SubSeg, Tag, FontTag, NL, NU, Tab, WS (Single Tag!)
This is done and committed so far.
But this is only a workaround for this concrete problem.
In general nested tags could not be resolved, if a tag used in the split logic before another tag is nested in the later one. So works the above workaround by moving WS to the end of the splitting order.
Since I don't know how often transit uses nested tags, this issue is urgent.