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

Thematic break after image is parsed as an heading level 2 #1259

Closed
4 tasks done
remorses opened this issue Nov 16, 2023 · 3 comments
Closed
4 tasks done

Thematic break after image is parsed as an heading level 2 #1259

remorses opened this issue Nov 16, 2023 · 3 comments
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@remorses
Copy link

Initial checklist

Affected packages and versions

15

Link to runnable example

https://stackblitz.com/edit/github-3xaefk?file=src%2Fmain.ts

Steps to reproduce

The following

![](../../assets/images/logos/cdk.png)
---

is parsed as

## ![](../../assets/images/logos/cdk.png)

Expected behavior

Don't add an heading block

Actual behavior

An heading block is added and the horizontal rule is removed

Runtime

Node v16

Package manager

No response

OS

No response

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Nov 16, 2023
@ChristianMurphy
Copy link
Member

Hey @remorses! 👋
Sorry you ran into some confusion.

That is not a bug, CommonMark has two ways to generate headers ATX and SETEXT.

This example is a SETEXT heading

![](../../assets/images/logos/cdk.png)
---

This example is an ATX heading

## ![](../../assets/images/logos/cdk.png)

both are valid and expected.

See https://commonmark.org/help/ and https://spec.commonmark.org/0.30/#setext-headings for more information.

@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2023
@ChristianMurphy ChristianMurphy added the 🙋 no/question This does not need any changes label Nov 16, 2023

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Nov 16, 2023
@remorses
Copy link
Author

Thank you, commonmark is full of surprises!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants