You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-05-25] [$1000] Line break before heading is missing in editing mode #17998
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Edit the comment and notice the text in editing composer is
test
# heading
Expected Result:
The line break before heading shouldn't be missing
Actual Result:
The line break before heading is missing
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?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.5-5 Reproducible in staging?: y Reproducible in production?: y 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
changed the title [-]Line break before heading is missing in editing mode[/-][+][$1000] Line break before heading is missing in editing mode[/+]on Apr 27, 2023
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: This is a typical markdown issue, we already have an item in the reviewer checklist to catch similar issues sooner If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
Determine if we should create a regression test for this bug. Thinking about it again, we don't need a regression test I think. We already have unit tests for this, no need to have a redundant manual test for something that's already automated
Reacted by Christina Dobrzynski and kadiealexander
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
MelvinBot commentedon Apr 26, 2023
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.MelvinBot commentedon Apr 26, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)dukenv0307 commentedon Apr 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Line break before heading is missing in editing mode
What is the root cause of that problem?
Draft message is display by
htmlToMarkdownfunction.htmlToMarkdownfunction usehtmlToMarkdownRulesto convert html tag to mark downApp/src/pages/home/report/ReportActionItemMessageEdit.js
Line 85 in f3fae40
And
htmlToMarkdownRulesinExpensiMarklib has a rule forh1tag:With this regex it replace
\s*<h1>by[block]#. So all line break before heading is replaced by one line break.What changes do you think we should make in order to solve the problem?
Replace regex rule for
h1inhtmlToMarkdownRulesby/<(h1)(?:"[^"]*"|'[^']*'|[^'">])*>(.*?)<\/\1>(?![^<]*(<\/pre>|<\/code>))/giWhat alternative solutions did you explore? (Optional)
NA
Result
Screencast.2023-04-26.17.17.42.mp4
kadiealexander commentedon Apr 27, 2023
Was able to reproduce:
2023-04-27_15-38-08.mp4
[-]Line break before heading is missing in editing mode[/-][+][$1000] Line break before heading is missing in editing mode[/+]MelvinBot commentedon Apr 27, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01ea44f382867687f1
MelvinBot commentedon Apr 27, 2023
Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new.
MelvinBot commentedon Apr 27, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)45 remaining items
kadiealexander commentedon May 25, 2023
Thanks @Christinadobrzyn!
mountiny commentedon May 25, 2023
Lets add the bonus as i was at AppJS
Christinadobrzyn commentedon May 25, 2023
Paid out the jobs in Upwork
@eh2077 - reporting bonus + speed bonus + contributor
@eVoloshchak speed bonus + C+
@eVoloshchak - can you let me know about a regression test? Thanks!
mountiny commentedon May 29, 2023
@eVoloshchak can you please follow up on the checklist above
@Christinadobrzyn @eVoloshchak I dont think we need a regression test for this
kadiealexander commentedon May 30, 2023
Thanks for helping with this while I as away @Christinadobrzyn!!
eVoloshchak commentedon May 30, 2023
Will finish the BZ checklist tomorrow
I think the regression test is needed here, this is something that could easily break, will propose a solutioneVoloshchak commentedon May 31, 2023
The PR that introduced the bug has been identified. Link to the PR: Add h1 markdown expensify-common#468
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/expensify-common/pull/468/files#r1212251731
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: This is a typical markdown issue, we already have an item in the reviewer checklist to catch similar issues sooner
If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.Determine if we should create a regression test for this bug. Thinking about it again, we don't need a regression test I think. We already have unit tests for this, no need to have a redundant manual test for something that's already automated
Christinadobrzyn commentedon May 31, 2023
Sounds good! Thanks for clarifying about the regression test @eVoloshchak - I think this can be closed as complete. right?
cc @mountiny
kadiealexander commentedon Jun 1, 2023
I agree @Christinadobrzyn, @mountiny if you disagree please reopen.