Skip to content

Allow whitespace characters within component regex #96

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

Merged
merged 9 commits into from
Sep 19, 2022

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Sep 16, 2022

Description

I realized some handlebars formatters will add indentation and newlines. Therefore, I've made the component regex a bit more robust to handle those situations.

Checklist:

Please update this checklist as you complete each item:

  • Tests have been included for all bug fixes or added functionality.
  • The changelog.rst has been updated with any significant changes, if necessary.
  • GitHub Issues which may be closed by this PR have been linked.

@rmorshea
Copy link
Contributor

In usages of the regex pattern you can use pattern.match(...).group(group_name) instead of grabbing them by index.

@Archmonger
Copy link
Contributor Author

Archmonger commented Sep 18, 2022

I believe pattern.match(...).group(group_name) only works with single objects. To "find all" I needed to use finditer and groupdict.

I don't believe I'm using the index anywhere anymore.

@Archmonger Archmonger merged commit da0c2cb into reactive-python:main Sep 19, 2022
@Archmonger Archmonger deleted the regex-match-whitespace branch September 19, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants