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

Acknowledge CRLF as possible EOL sequence for codefence #669

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

tienifr
Copy link
Contributor

@tienifr tienifr commented Mar 21, 2024

The back-end uses CRLF (\r\n) as EOL sequence for task description (reference here). In our parser, we only acknowledge LF (\n) as a possible EOL after 3 backticks fence, if it's not there, we'll append new line, this leads to a new line being added each time we edit task description.

Fixed Issues

$ Expensify/App#38001

Tests

1. What unit/integration tests cover your change? What autoQA tests cover your change?

The ExpensiMark-HTML-test.js is updated to include the new test cases.

2. What tests did you perform that validates your changed worked?

  • Run the unit test.
  • Test in Expensify App follow these steps:
  1. Edit a task description with code fence without line break
```task description```
  1. Save the description
  2. Open task descrition edit page again
  3. Repeat step 2 and 3 several times
  4. Verify that no extra line break is added each time saving the description

QA

1. What does QA need to do to validate your changes?

Test in Expensify App follow these steps:

  1. Edit a task description with code fence without line break
```task description```
  1. Save the description
  2. Open task descrition edit page again
  3. Repeat step 2 and 3 several times
  4. Verify that no new description is saved

2. What areas to they need to test for regressions?

NA

Screenshots

Screen.Recording.2024-03-25.at.16.17.31-compressed.mov

@tienifr tienifr changed the title Acknowledge CRLF as possible new line character for codefence Acknowledge CRLF as possible EOL sequence for codefence Mar 21, 2024
@tienifr tienifr marked this pull request as ready for review March 25, 2024 09:19
@tienifr tienifr requested a review from a team as a code owner March 25, 2024 09:19
@melvin-bot melvin-bot bot requested review from blimpich and removed request for a team March 25, 2024 09:19
@DylanDylann
Copy link
Contributor

@tienifr Seems like we have ESLint error. Pls fix it

@tienifr
Copy link
Contributor Author

tienifr commented Mar 25, 2024

@DylanDylann Are you sure? All checks have passed on my side.

Screenshot 2024-03-25 at 23 21 35

@DylanDylann
Copy link
Contributor

@tienifr I mean ESLint error here. These tests above don't cover ESLint error

Screenshot 2024-03-25 at 23 40 45

@blimpich
Copy link
Contributor

That line is unrelated to the code changes made in this PR, is it not?

@tienifr
Copy link
Contributor Author

tienifr commented Mar 26, 2024

@blimpich @DylanDylann yes that's not from my PR.

@DylanDylann
Copy link
Contributor

Alright, @johnmlee101 Can you help review this PR? Thanks

@johnmlee101
Copy link
Contributor

Hmm? What's the issue?

@tienifr
Copy link
Contributor Author

tienifr commented Mar 26, 2024

@johnmlee101 This one Expensify/App#38001. You might forget the linked issue in PR description😄

@johnmlee101
Copy link
Contributor

image Can't merge @tienifr

@tienifr
Copy link
Contributor Author

tienifr commented Mar 26, 2024

@johnmlee101 I've signed previous commits. We're good to go.

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.

6 participants