Prevent replacement of {\d+} sequences in chat.format and remove stray '#285
Closed
zford wants to merge 1 commit into
Closed
Prevent replacement of {\d+} sequences in chat.format and remove stray '#285zford wants to merge 1 commit into
zford wants to merge 1 commit into
Conversation
Member
|
I'm not sure this can be considered an improvement :s |
Contributor
Author
|
Oh come on, everybody knows what (?:^|(?<=[^\d'])|(?<=\d'}'))([{}][{}']*)(?:$|(?=[^\d'])|(?='{'\d)) does! In all seriousness, it does fix the actual problem presented with that commit. I couldn't figure out a cleaner way of doing it without that nasty regex. |
Member
|
This feels more like a hack than a fix, i'd rather not have such a horrible regex in there, for readability, maintainability and performance reasons. |
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.
This fixes issues presented by khobbits with the latest chat.format brace fix.
https://github.com/phrstbrn/Essentials/commit/8fde5102b9161cda2267d3638c15dc6fda48a7fd#commitcomment-2494321
Unfortunately the regex to fix it is gross (and largely unreadable), however, it does fix the issue and a few other edge cases.