Skip to content

fix: preserve backticks in makeMarkdown code blocks - #1116

Open
techprem324 wants to merge 3 commits into
showdownjs:masterfrom
techprem324:fix/1113-safe-codeblock-fence-clean
Open

techprem324 wants to merge 3 commits into
showdownjs:masterfrom
techprem324:fix/1113-safe-codeblock-fence-clean

Conversation

@techprem324

Copy link
Copy Markdown

Summary

  • Generate a code fence longer than the longest sequence of backticks inside the code block.
  • Prevent embedded triple backticks from prematurely closing generated Markdown code blocks.
  • Add a regression test covering code blocks containing triple backticks.
  • Update the nested GitHub code-block fixture to expect a four-backtick outer fence.

Testing

  • npm test
  • All 3,175 tests passed across 25 test files.

Fixes #1113

@techprem324

Copy link
Copy Markdown
Author

Hi maintainers,

I've submitted this fix for issue #1113 and verified it locally with all 3,175 tests passing.

I noticed the GitHub Actions workflows are awaiting maintainer approval. Could someone please review the PR and approve the workflows when convenient?

Thank you for your time!

This branch has not been deployed

No deployments
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.

makeMarkdown: code blocks that contain ``` are cut off

1 participant