You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and generate markdown with 1.4 and 1.5. the results are different.
While I understand, that the MDAST might not be valid in respect to the commonmark spec, I think that changing the context based on the child list in root should have been made in a major release...
Expected behavior
it should produce the same output.
Actual behavior
with 1.4 it produces:
# Title
Hello, world.
with 1.5 it produces:
# TitleHello, world.
Affected runtime and version
node@18
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered:
I consider this change a bugfix. Root nodes can contain any type of content, so long as it is of the same kind. Previously, all content was treated as blocks, which is incorrect. Because in markdown there are often unknown nodes (from the many extensions), the algorithm checks for explicit phrasing nodes (e.g., text or strong or so are always phrasing). When there are known phrasing nodes, the content is thus guaranteed to be phrasing.
Initial checklist
Affected packages and versions
mdast-util-to-markdown 1.5
Link to runnable example
No response
Steps to reproduce
create a simple tree with:
and generate markdown with 1.4 and 1.5. the results are different.
While I understand, that the MDAST might not be valid in respect to the commonmark spec, I think that changing the context based on the child list in
root
should have been made in a major release...Expected behavior
it should produce the same output.
Actual behavior
with 1.4 it produces:
with 1.5 it produces:
Affected runtime and version
node@18
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: