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

Chat - Additional lines are shown when editing a text with markdown type Quote #4898

Closed
kavimuru opened this issue Aug 28, 2021 · 4 comments
Closed
Assignees

Comments

@kavimuru
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to https://staging.new.expensify.com
  2. Log in with any account
  3. Start conversation
  4. Create a text type note for example the following text >This is a test of a note
  5. Click on Edit comment

Expected Result:

When editing, the same number of lines as the text of the note must be shown

Actual Result:

An additional blank line above and below the typed text is displayed

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number:
1.0.88-2
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Bug5212973_Issue_Quote

Expensify/Expensify Issue URL:

View all open jobs on GitHub

Issue not repro in production, adding the deploy blocker.

@kavimuru kavimuru added the DeployBlockerCash This issue or pull request should block deployment label Aug 28, 2021
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@MelvinBot
Copy link

Triggered auto assignment to @yuwenmemon (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@parasharrajat
Copy link
Member

We should remove the newline that is being prepended here in replacement & also from the regex \n?

 {
               name: 'quote',
               regex: /\n?<(blockquote|q)(?:"[^"]*"|'[^']*'|[^'">])*>([\s\S]*?)<\/\1>(?![^<]*(<\/pre>|<\/code>))/gi,
               replacement: (match, g1, g2) => {
                   const resultString = g2.trim().split('\n').map(m => `> ${m}`).join('\n');
                   return `\n${resultString}\n`;
               }
           },

@roryabraham
Copy link
Contributor

AFAICT this has no notable effect on the resulting markdown and isn't creating a real problem. Closing this out.

@roryabraham roryabraham removed the DeployBlockerCash This issue or pull request should block deployment label Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants