Compare commits

..

No commits in common. "18b9a27b44a865742c916b4d7993f157d3533ccb" and "e9f6f3dc7c499473adb04d0ea3c9c335029ae094" have entirely different histories.

View File

@ -45,34 +45,25 @@ def _update_for_base(
logger.debug("Pattern too short, continue!")
continue
tag = (
re.search(r":\[(.*)\]", line).group(1).strip()
if re.search(r":\[(.*)\]", line) is not None
re.match(r":\[(.*)\]$", line).group().strip()
if re.match(r":\[(.*)\]$", line)
else ""
)
for xml_file in filter(
lambda xml_file:
for line in filter(
lambda line:
# Matches glob pattern
fnmatch.fnmatchcase(str(xml_file), pattern)
fnmatch.fnmatchcase(str(line), pattern)
# contains tag if tag in pattern
and (
any(
map(
lambda xml_file_with_ending: etree.parse(
xml_file_with_ending
).find(f".//tag[@key='{tag}']")
is not None,
xml_file.parent.glob(f"{xml_file.name}.*.xml"),
)
)
etree.parse(file).find(f"//tag[@key='{tag}']")
if tag != ""
else True
)
# Not just matching an empty xml_file
and len(str(xml_file)) > 0,
# Not just matching an empty line
and len(str(line)) > 0,
all_xml,
):
matching_files.add(str(xml_file))
matching_files.add(str(line))
for file in Path("").glob(f"{base}.??.xhtml"):
xslt_root = etree.parse(file)