fix: prevent mnemonic removal from removing escaped ampersands (#1110)

* fix: revert mnemonic removal logic

* refactor: fix newer logic to keep '&&'
This commit is contained in:
Travis Abendshien
2025-09-07 13:37:11 -07:00
committed by GitHub
parent f258578f7b
commit 1c5e0016cc

View File

@@ -17,7 +17,7 @@ def remove_mnemonic_marker(label: str) -> str:
if ch == "&":
# escaped ampersand "&&"
if i + 1 < len(label) and label[i + 1] == "&":
result += "&"
result += "&&"
skip = True
# otherwise skip this '&'
continue