Skip to content

allow heading inside a quote#522

Merged
pecanoro merged 5 commits into
Expensify:mainfrom
eh2077:allow-header-in-quote
May 3, 2023
Merged

allow heading inside a quote#522
pecanoro merged 5 commits into
Expensify:mainfrom
eh2077:allow-header-in-quote

Conversation

@eh2077

@eh2077 eh2077 commented Apr 25, 2023

Copy link
Copy Markdown
Contributor

Fixed Issues

Expensify/App#17367

Tests

  1. Send a message, > # heading
  2. Verify the text is displayed in as header inside the quote
  3. Send following message
========= test case 1 ========
> [quote] case 1
> # heading
> [quote] case 1

[normal] case 1
# heading
[normal] case 1

========= test case 2 ========
> [quote] case 2
> 
> # heading
> 
> [quote] case 2

[normal] case 2

# heading

[normal] case 2
  1. Verify normal heading and heading inside quote have the same line break handling
Screen.Recording.2023-04-25.at.11.57.42.AM.mov

QA

Same as Tests above

@eh2077 eh2077 requested a review from a team as a code owner April 25, 2023 05:21
@melvin-bot melvin-bot Bot requested review from hayata-suenaga and removed request for a team April 25, 2023 05:22
@pecanoro

pecanoro commented Apr 25, 2023

Copy link
Copy Markdown
Contributor

@Santhosh-Sellavel I think if you leave a comment I will be able to add you as a reviewer, I think the settings for this repo are not properly set so I can't add external people.

@pecanoro pecanoro self-requested a review April 25, 2023 14:56

@Santhosh-Sellavel Santhosh-Sellavel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding myself as a reviewer

hayata-suenaga
hayata-suenaga previously approved these changes Apr 25, 2023

@hayata-suenaga hayata-suenaga left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The test cases make sense. I'm not well versed in markdown and string manipulation. I'd wait other people's preview.

Comment thread lib/ExpensiMark.js Outdated
Comment thread lib/ExpensiMark.js Outdated

@Santhosh-Sellavel Santhosh-Sellavel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, @pecanoro all yours!

Will test PR against E/APP!

@pecanoro pecanoro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested well!

@pecanoro

pecanoro commented May 1, 2023

Copy link
Copy Markdown
Contributor

@Santhosh-Sellavel @eh2077 Do you know why we remove the empty line after the heading in case 2 but we leave the one above the heading? I mean, that's the behavior with and without quotes but I find it pretty odd.

Comment thread lib/ExpensiMark.js Outdated
@eh2077

eh2077 commented May 1, 2023

Copy link
Copy Markdown
Contributor Author

@Santhosh-Sellavel @eh2077 Do you know why we remove the empty line after the heading in case 2 but we leave the one above the heading? I mean, that's the behavior with and without quotes but I find it pretty odd.

@pecanoro That's an interesting question. I guessed it's just because the product team want to have line breaks before heading and want to keep content after heading look compact(so removing line breaks after heading).

hayata-suenaga
hayata-suenaga previously approved these changes May 1, 2023

@hayata-suenaga hayata-suenaga left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@eh2077

eh2077 commented May 1, 2023

Copy link
Copy Markdown
Contributor Author

@Santhosh-Sellavel @eh2077 Do you know why we remove the empty line after the heading in case 2 but we leave the one above the heading? I mean, that's the behavior with and without quotes but I find it pretty odd.

@pecanoro I just encountered this again in another issue when addressing proposal review feedback from C+ team, see Expensify/App#17998 (comment). I think it's possible to improve this weird line break handling issue in that issue.

@Santhosh-Sellavel

Copy link
Copy Markdown
Contributor

I believe we are good to go here, for now. We have an active issue to fix or improve that behavior

@pecanoro Do you got your query resolved or still need clarfications?

@pecanoro

pecanoro commented May 3, 2023

Copy link
Copy Markdown
Contributor

Yes! Sorry, all comments are solved! I took a day off so I couldn't get back to this until today!

Comment thread lib/ExpensiMark.js Outdated
@pecanoro pecanoro merged commit afe4697 into Expensify:main May 3, 2023
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