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

fix(markdown-serializer): Add custom rule to escape horizontal rules for rich-text #163

Closed

Conversation

rfgamaral
Copy link
Member

@rfgamaral rfgamaral commented Mar 15, 2023

Overview

With #102 we overrode Turndown's escape mechanism with our custom implementation with custom rules to overcome the agressive rules built-in the default implementation. Before making this a permanent change, we tested the custom implementation in production for more than a month, and since no bugs were reported during that time, we decided to keep it. However, caused by this custom escape mechanism, we recently got our first bug report (ref). This PR fixes that issue by adding a custom rule to the custom escape mechanism.

PR Checklist

Test plan

The new custom rule is already fully tested by the added unit test, and unfortunately it's not possible to manually test this without making changes to the Storybook editor, which makes for a cumbersome test plan.

@rfgamaral rfgamaral self-assigned this Mar 15, 2023
@netlify
Copy link

netlify bot commented Mar 15, 2023

Deploy Preview for doist-typist ready!

Name Link
🔨 Latest commit b44f3ec
🔍 Latest deploy log https://app.netlify.com/sites/doist-typist/deploys/6411e4ccf58c2800081bd205
😎 Deploy Preview https://deploy-preview-163--doist-typist.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@rfgamaral
Copy link
Member Author

A simpler and less hacky solution was implemented on the renderer side instead (ref).

@rfgamaral rfgamaral closed this Mar 16, 2023
@rfgamaral rfgamaral deleted the ricardo/improve-markdown-escaping-for-rich-text branch March 16, 2023 10:20
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.

1 participant