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

Change accepted syntax for code fence #690

Conversation

BartoszGrajdek
Copy link
Contributor

@BartoszGrajdek BartoszGrajdek commented Apr 29, 2024

We're currently working on adding styles to code fence & inline code blocks to Live Markdown. After some discussion regarding code fence/pre block we agreed that the best way to handle it is to limit the accepted syntax variations.

This PR adds these changes directly to ExpensiMark 🙌🏻

Fixed Issues

$ GH_LINK

Tests

  1. What unit/integration tests cover your change? What autoQA tests cover your change?
    All of the tests that have changed in this PR
  2. What tests did you perform that validates your changed worked?
    I tested it both in Live Markdown & in the Expensify App to make sure that it didn't break anything

QA

  1. What does QA need to do to validate your changes?
    Check if there's just one syntax valid for pre blocks which should be:
(triple backticks)
Content...
(triple backticks)
  1. What areas to they need to test for regressions?
    Mainly Expensify chat & how it treats messages sent with different syntax variations. Live Markdown will include these changes after we get this PR merged 👀
Screen.Recording.2024-05-14.at.14.18.30.mov

@BartoszGrajdek BartoszGrajdek changed the title feat: limit accepted syntax for code fence Change accepted syntax for code fence May 6, 2024
@BartoszGrajdek BartoszGrajdek marked this pull request as ready for review May 14, 2024 12:25
@BartoszGrajdek BartoszGrajdek requested a review from a team as a code owner May 14, 2024 12:25
@melvin-bot melvin-bot bot requested review from dangrous and removed request for a team May 14, 2024 12:26
Copy link
Contributor

@dangrous dangrous left a comment

Choose a reason for hiding this comment

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

Cool, this looks good and makes sense as a simplification. Do you mind sharing the discussion (was it an issue? Slack?) that led to this just so I can read that before merging? Thank you!

@BartoszGrajdek
Copy link
Contributor Author

BartoszGrajdek commented May 15, 2024

The link to a slack thread is in the PR description, let me know if you have access to it 😄

@dangrous
Copy link
Contributor

So I think that link goes to the SWM slack and I can't access. Basically I just wanted to make sure this was run by someone on the Expensify side before I merged? Since it's (sort of) a product decision. I think this makes the most sense to me but wanted to make sure I was the second opinion haha. Thank you!

@BartoszGrajdek
Copy link
Contributor Author

Hi, sorry - I was on sick leave last week 😅

I've sent you screenshots of our discussion with Expensify on Slack in a DM 🙌🏻

@dangrous
Copy link
Contributor

Thank you! That was helpful - merging now.

@dangrous
Copy link
Contributor

(and glad you're feeling better!)

@dangrous dangrous merged commit 84ac039 into Expensify:main May 22, 2024
5 checks passed
}
return `${g1}<code>${g2}</code>${g3}`;
},
regex: /(\B|_|)&#x60;(.*?(?![&#x60;])\S.*?)&#x60;(\B|_|)(?!&#x60;|[^<]*<\/pre>)/gm,

Choose a reason for hiding this comment

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

I think this change might've caused the following issue:

Which was fixed in PR #785, more details in the proposal.

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