As per the suggestion in #62 , preserving the whitespace while converting from USX to USJ.
First attempted to remove .strip() from both if statement and append function, but then the converted samples had unnecessary newlines and spaces which were part of XML's indentation. Now the approach is following:
Not to trim the extra lines or space at front and rear of a text
If the string only contains whitespace characters, ignore it.
Same code changes are made in files
python/scripts/usx2usj.py
python/lib/usfmtc/usjproc.py
USJ samples in testsuite are regenerated with above updated code.
.strip()
from bothif
statement andappend
function, but then the converted samples had unnecessary newlines and spaces which were part of XML's indentation. Now the approach is following: