Skip to content

#82: regex-only escape not supported in re fallback module - #83

Closed
fireundubh wants to merge 1 commit into
ppannuto:mainfrom
fireundubh:re-fallback-fix
Closed

#82: regex-only escape not supported in re fallback module#83
fireundubh wants to merge 1 commit into
ppannuto:mainfrom
fireundubh:re-fallback-fix

Conversation

@fireundubh

@fireundubh fireundubh commented Jun 16, 2021

Copy link
Copy Markdown

Addressing #82:

All current tests pass. Whether existing tests cover the Unicode issues that the regex-only \p escape was intended to address is another matter. The author of #46 should be able to provide insight into whether the existing tests cover those issues.

Fixed issue where custom abbreviations test failed due to permission error
@brocksam brocksam mentioned this pull request Jun 16, 2021
@brocksam

Copy link
Copy Markdown
Contributor

Excellent work, @fireundubh, thank you!

The current tests do include examples with Unicode characters (#46 added the examples suggested in #33 where this was originally raised).

Play devil's advocate, would we be better off keeping the package's logic the same in the cases where regex is available and falling back to using re and the approach reimplemented in this PR if it is not? #46 and regex may well perform slightly different in edge cases that aren't in the current tests and if we keep the package functioning identically for instances where regex can be found then we don't risk breaking functionality for any downstream users.

I've added #84 which adds a simple GitHub Actions workflow to set up automated running of the tests using a configuration without regex and also a configuration with regex. Merging #84, in conjunction with this PR (#83), should help ensure that Titlecase continues to work with re as a fallback for regex going forward.

@brocksam

Copy link
Copy Markdown
Contributor

This PR is now superseded by #84, with all credit to @fireundubh.

@ppannuto

Copy link
Copy Markdown
Owner

Closing in favor of #84.

@ppannuto ppannuto closed this Jun 16, 2021
@fireundubh
fireundubh deleted the re-fallback-fix branch June 17, 2021 11:49
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.

3 participants