diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-03-14 00:50:23 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-03-14 00:50:23 +0100 |
commit | a52c50d0ab2043fcb53834daa012ef6cdcb5fbca (patch) | |
tree | a587f5b0773313b98ee14f8ef78d496a0cbc66ea /scripts | |
parent | 7971615358ce097b10b6b3dbfdc0b242a4b59557 (diff) | |
parent | 1b91006ac50b714553b27c53ff7cc406d234639c (diff) | |
download | installation-guide-a52c50d0ab2043fcb53834daa012ef6cdcb5fbca.zip |
Merge branch 'master' of salsa.debian.org:installer-team/installation-guide
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/merge_xml.awk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/merge_xml.awk b/scripts/merge_xml.awk index cf87055d9..42a92c172 100644 --- a/scripts/merge_xml.awk +++ b/scripts/merge_xml.awk @@ -25,7 +25,7 @@ BEGIN { { # In the main loop we only want to process entities that are refered to line = $0 - if (match (line, /^[[:space:]]*&.*\.xml;[[:space:]]*(<\!--.*-->[[:space:]]*|)*$/) > 0) { + if (match (line, /^[[:space:]]*&.*\.xml;[[:space:]]*(<!--.*-->[[:space:]]*|)*$/) > 0) { process_file(line, "main") } } @@ -92,7 +92,7 @@ function parse_file(PARSEFILE, FNAME, fname, nwline, comment_count) { # Update the count of 'open' comments comment_count += count_comments(nwline) - if (match(nwline, /^[[:space:]]*&.*\.xml;[[:space:]]*(<\!--.*-->[[:space:]]*|)*$/) > 0) { + if (match(nwline, /^[[:space:]]*&.*\.xml;[[:space:]]*(<!--.*-->[[:space:]]*|)*$/) > 0) { # If we find another entity reference, we process that file recursively # But not if the reference is within a comment if (comment_count != 0) { @@ -102,13 +102,13 @@ function parse_file(PARSEFILE, FNAME, fname, nwline, comment_count) { } } else { # Else we just print the line - if (match(nwline, /<\!--.*<.*>.*<.*>.*-->/) > 0) { + if (match(nwline, /<!--.*<.*>.*<.*>.*-->/) > 0) { # Comments containing "<...> ... <...>" are not handled correctly # by xml2pot and split2po, so we skip lines like that # Note: this is a workaround for a bug in the tools: # http://bugs.kde.org/show_bug.cgi?id=90294 print "** Comment deleted in line '" nwline "'" >>LOG - gsub(/<\!--.*<.*>.*<.*>.*-->/, "", nwline) + gsub(/<!--.*<.*>.*<.*>.*-->/, "", nwline) } print nwline >>OUTFILE } @@ -131,7 +131,7 @@ function get_entname(entline, ename) { function count_comments(inline, tmpline, count) { # 'abuse' gsub to count them tmpline = inline - count += gsub(/<\!--/, "", tmpline) + count += gsub(/<!--/, "", tmpline) count -= gsub(/-->/, "", tmpline) return count } |