Skip to content

fix: Fix indented markdown in html#2052

Merged
UziTech merged 5 commits intomarkedjs:masterfrom
krassowski:fix-indented-markdown-in-html
May 20, 2021
Merged

fix: Fix indented markdown in html#2052
UziTech merged 5 commits intomarkedjs:masterfrom
krassowski:fix-indented-markdown-in-html

Conversation

@krassowski
Copy link
Copy Markdown
Contributor

@krassowski krassowski commented May 14, 2021

Marked version: 1.2.8-2.0.3

Markdown flavor: n/a

Description

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel
Copy link
Copy Markdown

vercel bot commented May 14, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/markedjs/markedjs/BUgTvEdPFRDvwkiPPmi1MYWZccbi
✅ Preview: https://markedjs-git-fork-krassowski-fix-indented-markdown-953ce6.vercel.app

@UziTech
Copy link
Copy Markdown
Member

UziTech commented May 17, 2021

I don't think that actually fixes it

according to this demo the test you added should pass without changing anything in marked.

@krassowski
Copy link
Copy Markdown
Contributor Author

I don't think that actually fixes it
according to this demo the test you added should pass without changing anything in marked.

It does. You copied my test without space and that's because the demo works. Probably because spaces are not rendered in the diff in GitHub interface.

it-does

Copy link
Copy Markdown
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

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

This looks like it could work.

Comment thread src/rules.js Outdated
Comment thread test/specs/new/indented_details.md
Comment thread test/specs/new/indented_details.html
Copy link
Copy Markdown
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! 💯

Comment thread src/rules.js Outdated
Copy link
Copy Markdown
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

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

Thanks!

@UziTech UziTech changed the title Fix indented markdown in html fix: Fix indented markdown in html May 20, 2021
@UziTech UziTech merged commit 6435ac9 into markedjs:master May 20, 2021
github-actions bot pushed a commit that referenced this pull request May 20, 2021
## [2.0.4](v2.0.3...v2.0.4) (2021-05-20)

### Bug Fixes

* Fix indented markdown in html ([#2052](#2052)) ([6435ac9](6435ac9))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Comment thread src/rules.js
+ '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag
+ '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (6)
+ '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (7) open tag
+ '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (7) closing tag
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.

No REDOS issues in this change.

Logiclayer1111 pushed a commit to Logiclayer1111/marked that referenced this pull request Apr 20, 2026
## [2.0.4](markedjs/marked@v2.0.3...v2.0.4) (2021-05-20)

### Bug Fixes

* Fix indented markdown in html ([#2052](markedjs/marked#2052)) ([c311e50](markedjs/marked@c311e50))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTML inside markdown will cause it fail to parse.

5 participants