diff --git a/dmlex-v1.0/specification/examples/examples/build_source.py b/dmlex-v1.0/specification/examples/examples/build_source.py index 87dfc96..0443065 100644 --- a/dmlex-v1.0/specification/examples/examples/build_source.py +++ b/dmlex-v1.0/specification/examples/examples/build_source.py @@ -15,7 +15,12 @@ with open(f) as inf: with open(f + ".xml", "w") as outf: outf.write("\n") - outf.write(inf.read().replace("<", "<").replace(">", ">")) + for line in inf.readlines(): + while len(line) > N: + outf.write(line[:N].replace("<", "<").replace(">", ">")) + outf.write("\n") + line = line[N:] + outf.write(line.replace("<", "<").replace(">", ">")) outf.write("\n") for f in glob("source/*.rdf"):