Delete nested tag inside codeFence#564
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@puneetlath assigning you since this is related to an issue you're managing |
|
@mollfpr please take the first review. |
|
Sorry for the delay guys. I got cold yesterday 🙏 @akamefi202 You need to sign the commit https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#begin-coding-your-solution-in-a-pull-request For the CLA, I guess you can comment |
dab7b15 to
eddbc14
Compare
Signed-off-by: akamefi202 <akamefi202@gmail.com>
Signed-off-by: akamefi202 <akamefi202@gmail.com>
Signed-off-by: akamefi202 <akamefi202@gmail.com>
Signed-off-by: akamefi202 <akamefi202@gmail.com>
eddbc14 to
23a1a44
Compare
mollfpr
left a comment
There was a problem hiding this comment.
Tested great on the ND and seems the tests are run pretty well 👍
| testString = '<pre>code<br></pre>text'; | ||
| expect(parser.htmlToMarkdown(testString)).toBe('```\ncode\n```\ntext'); | ||
|
|
||
| testString = '<h3>test heading</h3><div><pre class=\"notranslate\"><code class=\"notranslate\">Code snippet\n</code></pre></div><blockquote><p><a href=\"https://www.example.com\">link</a></p></blockquote>'; |
There was a problem hiding this comment.
Out of curiosity, why are we using an h3 in this test instead of an h1?
There was a problem hiding this comment.
If we copy & paste selection from Github, heading is shown as h3 tag.
|
Looks good to me! @akamefi202 you'll next need to open a PR in the App repo to point to the updated expensify-common commit hash. |
|
@puneetlath @mollfpr Thanks. I will create a PR in the App repo too! |
|
@puneetlath @mollfpr I created the PR in App repo. |
Added a new rule to
htmlToMarkdownRulesto remove unnecessary nested tags inside<pre>tag.Fixed Issues
Expensify/App#23659
Tests
In
ExpensiMark-Markdown-test.jsfile, test namedTest codeFence copy from selection does not add extra new line.Checked if
htmlToMarkdownremoves unnecessary tags correctly so extra newline character isn't added.QA
Run the new test cases.
N/A