Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

707: Detect instance expressions with double quotes #709

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

lindsay-stevens
Copy link
Contributor

Closes #707

Like other functions, argument value(s) (instance name) should be allowed to be wrapped in single or double quotes. Previously only singles quotes worked.

Why is this the best possible solution? Were any other approaches considered?

Uses existing XML generation function. Not sure why there was an f-string used before, maybe some kind of conflict with something else that has since been resolved.

What are the regression risks?

It's more consistent with the rest of pyxform now, but maybe some users don't want XML escapes here. As shown in the updated tests, other characters that will be escaped now are <>&.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No

Before submitting this PR, please make sure you have:

  • included test cases for core behavior and edge cases in tests
  • run python -m unittest and verified all tests pass
  • run ruff format pyxform tests and ruff check pyxform tests to lint code
  • verified that any code or assets from external sources are properly credited in comments

- like other functions, argument value(s) (instance name) should be
  allowed to be wrapped in single or double quotes. Previously only
  singles quotes worked.
Copy link
Contributor

@lognaturel lognaturel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick form I used to complement the tests: https://docs.google.com/spreadsheets/d/13Ow7UXMt5wjMXawa8XrJcoxGhnvwk91xHovFS8K0IVI/edit#gid=0

A small change with a big impact!

@lognaturel lognaturel merged commit 59c37e0 into XLSForm:master Jun 18, 2024
10 checks passed
@lindsay-stevens lindsay-stevens deleted the pyxform-707 branch June 19, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect instance expressions with double quotes
2 participants