Thematic break after image is parsed as an heading level 2
Closed this issue · 3 comments
remorses commented
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
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
ChristianMurphy commented
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.
github-actions commented
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
remorses commented
Thank you, commonmark is full of surprises!