Skip to content

Commit 0c67c13

Browse files
authored
Fix a couple minor issues with XML preprocessor (#1787)
* Avoid formatting symbolic function expressions. Add an error logger for MathPresso JIT. Workaround problems geosx_xml_tools installation in user mode.
1 parent 79b9b70 commit 0c67c13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

geosx_xml_tools_package/geosx_xml_tools/xml_formatter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def format_xml_level(output,
8383

8484
# Format attributes
8585
for ka in akeys:
86-
attribute_dict[ka] = format_attribute(attribute_indent, ka, attribute_dict[ka])
86+
# Avoid formatting mathpresso expressions
87+
if not (node.tag in ["SymbolicFunction", "CompositeFunction"] and ka == "expression"):
88+
attribute_dict[ka] = format_attribute(attribute_indent, ka, attribute_dict[ka])
8789

8890
for ii in range(0, len(akeys)):
8991
k = akeys[ii]

0 commit comments

Comments
 (0)