Skip to content
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

Update strikethrough replace rule to fix multiple tilde error #569

Merged
merged 4 commits into from
Sep 11, 2023

Conversation

akamefi202
Copy link
Contributor

@akamefi202 akamefi202 commented Aug 31, 2023

Update strikethrough replace rule to fix multiple tilde error when transition from text to html.
To make sure that <del> tag contains content text, if it's wrapped by multiple tilde characters.
Currently, <del> tag contains 2 tilde characters too after transition.

Fixed Issues

Expensify/App#25693

Tests

  1. What unit/integration tests cover your change? What autoQA tests cover your change?
    In ExpensiMark-HTML-test.js file, test named "Test strikethrough with multiple tilde characters" works correctly.
  2. What tests did you perform that validates your changed worked?
    Checked if the updated strikethrough rule only wraps content text inside multiple tilde characters.

QA

  1. What does QA need to do to validate your changes?
    Run the new test cases.
  2. What areas to they need to test for regressions?
    N/A

package-lock.json Outdated Show resolved Hide resolved
@parasharrajat
Copy link
Member

parasharrajat commented Aug 31, 2023

Fix the PR title. It should explain your changes. Please use better commit messages which explain the code.

@akamefi202 akamefi202 changed the title first commit Update strikethrough replace rule to fix multiple tilde error Aug 31, 2023
@akamefi202
Copy link
Contributor Author

akamefi202 commented Aug 31, 2023

@parasharrajat I updated the PR title, commit message and description.

@akamefi202 akamefi202 force-pushed the strikethrough-markdown branch from a164b47 to 7227665 Compare August 31, 2023 09:40
Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

cc: @neil-marcellini

Copy link
Contributor

@neil-marcellini neil-marcellini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also test html to text and html to markdown to make sure that all works too.

I don't really understand the full regex, so let's be sure to also test the steps from the PR where this was last changed.

__tests__/ExpensiMark-HTML-test.js Outdated Show resolved Hide resolved
@parasharrajat
Copy link
Member

Yes for #461, we added a unit test.

@akamefi202
Copy link
Contributor Author

akamefi202 commented Aug 31, 2023

I think we should also test html to text and html to markdown to make sure that all works too.

I think previous test cases include test for this already.

@akamefi202
Copy link
Contributor Author

@parasharrajat @neil-marcellini I pushed new commit for required changes above.

@neil-marcellini neil-marcellini changed the title Update strikethrough replace rule to fix multiple tilde error [HOLD merge freeze] Update strikethrough replace rule to fix multiple tilde error Sep 1, 2023
@akamefi202
Copy link
Contributor Author

@tylerkaraszewski @parasharrajat @neil-marcellini Can we merge this PR if it is approved?

@tylerkaraszewski
Copy link
Contributor

Not while it says "hold merge freeze" in the title. We are still waiting on the end of that freeze.

@akamefi202
Copy link
Contributor Author

@tylerkaraszewski @parasharrajat @neil-marcellini Merge freeze is over now. Could you please merge this PR soon?

@tylerkaraszewski tylerkaraszewski changed the title [HOLD merge freeze] Update strikethrough replace rule to fix multiple tilde error Update strikethrough replace rule to fix multiple tilde error Sep 11, 2023
@tylerkaraszewski tylerkaraszewski merged commit 35bff86 into Expensify:main Sep 11, 2023
3 checks passed
@akamefi202 akamefi202 deleted the strikethrough-markdown branch September 11, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants