mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 15:50:37 +02:00
intel/genxml: Ignore tail leading/trailing whitespace in node_validator()
When importing or flattening genxml with the genxml_import.py script in MR !20593, it can lead to the tail portion of xml items differing in whitespace. If we strip the trailing and leading whitespace from the tail string, and the strings are equivalent, then we can consider the xml items to be equivalent. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24903>
This commit is contained in:
parent
5d37359f32
commit
d8038c8d09
1 changed files with 1 additions and 1 deletions
|
|
@ -105,7 +105,7 @@ def node_validator(old: et.Element, new: et.Element) -> bool:
|
|||
# Check that the attributes are the same
|
||||
old.tag == new.tag and
|
||||
old.text == new.text and
|
||||
old.tail == new.tail and
|
||||
(old.tail or "").strip() == (new.tail or "").strip() and
|
||||
list(old.attrib.items()) == list(new.attrib.items()) and
|
||||
len(old) == len(new) and
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue