From 21262b09d75321bb850959a257698c635111a0be Mon Sep 17 00:00:00 2001 From: benoit74 Date: Tue, 7 May 2024 12:23:03 +0000 Subject: [PATCH] fixup! Adjust magic numbers used for XML manipulation --- src/sotoki/utils/preparation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sotoki/utils/preparation.py b/src/sotoki/utils/preparation.py index 351bef7..3c46bc9 100644 --- a/src/sotoki/utils/preparation.py +++ b/src/sotoki/utils/preparation.py @@ -233,7 +233,7 @@ def read_sub(): for main_line in mainfh: main_id = get_id_in(main_line, field_index_in_main) - # write main line to dest; removing tag end (/> -> >) and CRLF + # write main line to dest; removing tag end (/>) and LF dsth.write(main_line[:-3]) dsth.write(b">") @@ -247,8 +247,8 @@ def read_sub(): has_subs = True dsth.write(node_start) - # write the sub line removing the 2 heading spaces, node name (` + # rewrite with new name replacing `LF` fhs[found_id].write(starts[found_id]) fhs[found_id].write(line[4:-5]) fhs[found_id].write(ends[found_id]) @@ -403,7 +403,7 @@ def read_csv(): break if current_csv[0] == post_id: - # write user line to dest; removing tag end and CRLF + # write user line to dest; removing tag open () and LF dsth.write(b"