Escape both <> characters in SVG test labels#6056
Merged
tanujkhattar merged 6 commits intoquantumlib:masterfrom Apr 7, 2023
Merged
Escape both <> characters in SVG test labels#6056tanujkhattar merged 6 commits intoquantumlib:masterfrom
<> characters in SVG test labels#6056tanujkhattar merged 6 commits intoquantumlib:masterfrom
Conversation
Also parametrize test_gate_with_less_greater_str so it is easier to add checks for more wire symbols.
tanujkhattar
reviewed
Apr 7, 2023
| @@ -23,10 +23,7 @@ def fixup_text(text: str): | |||
| if '[cirq.VirtualTag()]' in text: | |||
| # https://github.com/quantumlib/Cirq/issues/2905 | |||
| return text.replace('[cirq.VirtualTag()]', '') | |||
Collaborator
There was a problem hiding this comment.
Should we change the if statements above as well so that we don't return as soon as a single if matches?
Collaborator
Author
There was a problem hiding this comment.
Sure, of course! Done. I have left the first short-circuit if as it does not matter when the string is dropped.
tanujkhattar
approved these changes
Apr 7, 2023
harry-phasecraft
pushed a commit
to PhaseCraft/Cirq
that referenced
this pull request
Oct 31, 2024
* Test escaping both `<>` symbols in SVG Also parametrize test_gate_with_less_greater_str so it is easier to add checks for more wire symbols. * Escape both `<>` symbols when used as symbols in SVG * Skip typecheck at import of IPython.display * Test short-circuit fixup of a multi-line SVG text Strings with `\n` are replaced with '?'. * Test SVG replacements are all in effect * Apply all fixups to SVG string labels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also parametrize
test_gate_with_less_greater_strso it is easier toadd checks for more wire symbols later.