-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Empty codeblock appears when using mention with bold markdown #18825
Comments
Triggered auto assignment to @tjferriss ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Empty codeblock appears when mention with bold markdown inside codeblock What is the root cause of that problem?Codeblock is rendered in here, the content of text is
What changes do you think we should make in order to solve the problem?On native, because children of
On the other platforms, We could change the children of text from props.defaultRendererProps.tnode.data to <TNodeChildrenRenderer tnode={props.defaultRendererProps.tnode} /> to render exactly content for all case in web. If expected of codeblock is not apply styles of children tag inside we can do similar with solution for native above.
What alternative solutions did you explore? (Optional)If dont't need to update Render of codeblock, we need verify that html of codeblock markdown only have text inside and without any tag. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Mentions within codeblocks are resulting in an empty codeblock displaying on the FE, despite the message correctly reaching the BE. What is the root cause of that problem?Mentions within codeblocks are incorrectly being processed by This also happens for any additional text included in a codeblock, e.g. `hello @[email protected]` will have the same result of an empty codeblock. If we look at the regex used by the mentions in
There's an underlying issue that @dukenv0307's proposal highlights that is actually causing the codeblock to display as empty, but I don't think it's worth fixing as it's only happening because mentions are being rendered within the codeblock, which shouldn't be happening in the first place! What changes do you think we should make in order to solve the problem?The reason we're capturing the We can therefore change the regex (for both
Changing the I've also added a negative lookahead for the same tags as closing tags, so that we don't match other codeblocks within the message, e.g.: What alternative solutions did you explore? (Optional)We could also avoid the negative lookahead and use capture groups instead to pass the actual captured mention separately from the context (i.e. any HTML tags). Then in |
@tjferriss you need start after * with "@" before email |
@tjferriss Just to clarify, the string you need to enter is: |
@tjferriss I am also able to reproduce. |
Should be getting fixed in #18983 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
*hello*
*@[email protected]*
Expected Result:
Mentioning user in bold format and within backticks should not behave weirdly and empty message should not be shown
Actual Result:
Mentioning user in bold format and within backticks behaves weirdly and empty message is shown (works well with the messages , problem is with the mentions only)
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.13
Reproducible in staging?: y
Reproducible in production?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
error-2023-05-11_16.34.54.mp4
Recording.572.mp4
Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1683802669770569
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: