mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 04:24:32 +00:00
Remove line breaks in attribute value of nm-property-infos-*.xml
Since line breaks are not needed for XML's attribute tag, remove the unnecessary line breaks. Signed-off-by: Wen Liang <liangwen12year@gmail.com>
This commit is contained in:
parent
e67ddd826f
commit
90422ddd1a
|
@ -74,14 +74,14 @@ def process_data(data):
|
||||||
kwd_more_line_found = re.search(r"^\s*\**\s+(.*?)\s*$", line)
|
kwd_more_line_found = re.search(r"^\s*\**\s+(.*?)\s*$", line)
|
||||||
if kwd_first_line_found:
|
if kwd_first_line_found:
|
||||||
keyword = kwd_first_line_found.group(1)
|
keyword = kwd_first_line_found.group(1)
|
||||||
value = kwd_first_line_found.group(2) + "\n"
|
value = kwd_first_line_found.group(2) + " "
|
||||||
parsed_data[keyword] = escape_xml_char(value)
|
parsed_data[keyword] = escape_xml_char(value)
|
||||||
elif kwd_more_line_found:
|
elif kwd_more_line_found:
|
||||||
if not keyword:
|
if not keyword:
|
||||||
print("Extra mess in a comment: %s" % (line))
|
print("Extra mess in a comment: %s" % (line))
|
||||||
exit(1)
|
exit(1)
|
||||||
else:
|
else:
|
||||||
value = kwd_more_line_found.group(1) + "\n"
|
value = kwd_more_line_found.group(1) + " "
|
||||||
parsed_data[keyword] += escape_xml_char(value)
|
parsed_data[keyword] += escape_xml_char(value)
|
||||||
for keyword in keywords:
|
for keyword in keywords:
|
||||||
if keyword == "variable" and keyword not in parsed_data:
|
if keyword == "variable" and keyword not in parsed_data:
|
||||||
|
|
Loading…
Reference in a new issue