-
Notifications
You must be signed in to change notification settings - Fork 137
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
Improve markdown italicizing when following tags #695
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Could you please fill out the issue description? |
Additionally, the GH_LINK text should be replaced with the link Expensify/App#41110 so it would be $ Expensify/App#41110 |
@sobitneupane I can't seem to assign you here, so you might have to comment on the issue first |
DONE |
Sorry for the delay. I will review the PR asap. |
lib/ExpensiMark.js
Outdated
* `\b\_([^<>]*?)\_\b` doesn't work because it won't replace | ||
* `_https://www.test.com_` | ||
* Use [\s\S]* instead of .* to match newline | ||
* Ignore <pre>, <code>, <a>, <mentin-user> tag contents first, so _blank is ignored due to it a property of <a>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skyweb331 Can you please only remove those comments that are irrelevant after the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sobitneupane Removed the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skyweb331 Sorry for the misunderstanding. I mean to say please keep older comments as well if they are still relevant.
@@ -177,7 +177,7 @@ export default class ExpensiMark { | |||
{ | |||
name: 'reportMentions', | |||
|
|||
regex: /(?<![^ \n*~_])(#[\p{Ll}0-9-]{1,80})/gmiu, | |||
regex: /(?<![^ \n*~_])(#[\p{Ll}0-9-]{1,80})/gimu, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sobitneupane This is done by my vscode prettier... seems like no meaningful change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @skyweb331
Hmm, looks like we have some commits that are not signed - @skyweb331 could you fix them with steps from https://expensify.slack.com/archives/C01GTK53T8Q/p1711655905519379?thread_ts=1711571483.669109&cid=C01GTK53T8Q? |
@thienlnam I thought commit verification is only for NewDot. I fixed it. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
🚀Published to npm in v2.0.6 |
Fixed Issues
$ Expensify/App#41110
This PR is to fix italicizing the context which are following
<code>,<pre>,<a>
tags in one line.Tests
Passed all existing test cases and Added one more test case for this purpose.
bump expensify-common version in E/App and
react-native-live-markdown
to this PR and tested locallyQA
bump expensify-common version in E/App and use chat normally - sent messages should be parsed with the new rule
Italic markdown following
<code>,<pre>,<a>,<mention-user>
tags in one line