Repository navigation
Add support for inline code with space only character as content - #797
Merged
Merged
Conversation
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
melvin-bot
Bot
requested review from
jasperhuangg
and removed request for
a team
September 9, 2024 01:39
6 tasks done
Contributor
Author
|
cc @hoangzinh |
hoangzinh
reviewed
Sep 9, 2024
| // must be present inside the backticks. | ||
| regex: /(\B|_|)`((?:`)*(?!`).*?[\S| |\u00A0]+?.*?(?<!`)(?:`)*)`(\B|_|)(?!`|[^<]*<\/pre>|[^<]*<\/video>)/gm, | ||
| replacement: (_extras, _match, g1, g2, g3) => { | ||
| return `${g1}<code>${g2.replaceAll(' ', ' ')}</code>${g3}`; |
There was a problem hiding this comment.
Should we only replace string with HTML encoding when a g2 contains only whitespaces? Any thoughts
Contributor
Author
There was a problem hiding this comment.
Yes, I was thinking about it as well. I will modify the code.
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
|
cc @deetergp all yours |
deetergp
self-requested a review
September 10, 2024 18:14
Contributor
|
Code looks good and tests well 👍 |
deetergp
approved these changes
Sep 10, 2024
|
🚀Published to npm in v2.0.88 |
| // must be present inside the backticks. | ||
| regex: /(\B|_|)`((?:`)*(?!`).*?[\S| |\u00A0]+?.*?(?<!`)(?:`)*)`(\B|_|)(?!`|[^<]*<\/pre>|[^<]*<\/video>)/gm, | ||
| replacement: (_extras, _match, g1, g2, g3) => { | ||
| const g2Value = g2.trim() === '' ? g2.replaceAll(' ', ' ') : g2; |
Contributor
There was a problem hiding this comment.
These changes are partly related to this issue
More details here
1 of 6 tasks
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.

Fixed Issues
$ Expensify/App#48101
Tests
I have add unit tests for this issue.
Update the related regex in the expensify-common in node module and send the test messages from composer of the App.
Test example:
Must be displayed as:
Another test :
` `must be displayed as :QA
What does QA need to do to validate your changes?
Same as test above
What areas to they need to test for regressions?
Inline code and code fence related tests.