This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Single element in markdown not being rendered #157
Comments
--Possibly related: #156-- |
I'd make |
koraa
added a commit
that referenced
this issue
Jan 16, 2019
Before this we would wrap multi-element markdowns with a div and leave single element markdowns as-is. This caused a bug where the single element markdowns where discarded (because emit-html though it was just an empty wrapper div). Fixes #157
koraa
added a commit
that referenced
this issue
Jan 18, 2019
This wrapping div would be added when there was more then one element in the markdown (which is the usual case) by hyperscript because hyperscript has no concept of multiple elements in the root node. Our code came to expect this wrapping which led to markdowns with a single element being rendered as an empty document in some cases (the single element would be deleted during the emit-html when generating .content.children). This commit fixes this issue by using hast-util-to-html instead of hyperscript for the hast -> html conversion which does indeed have a concept of multiple elements at the root node. Fixes #157
koraa
added a commit
that referenced
this issue
Jan 18, 2019
This wrapping div would be added when there was more then one element in the markdown (which is the usual case) by hyperscript because hyperscript has no concept of multiple elements in the root node. Our code came to expect this wrapping which led to markdowns with a single element being rendered as an empty document in some cases (the single element would be deleted during the emit-html when generating .content.children). This commit fixes this issue by using hast-util-to-html instead of hyperscript for the hast -> html conversion which does indeed have a concept of multiple elements at the root node. Fixes #157
koraa
added a commit
that referenced
this issue
Jan 18, 2019
This wrapping div would be added when there was more then one element in the markdown (which is the usual case) by hyperscript because hyperscript has no concept of multiple elements in the root node. Our code came to expect this wrapping which led to markdowns with a single element being rendered as an empty document in some cases (the single element would be deleted during the emit-html when generating .content.children). This commit fixes this issue by using hast-util-to-html instead of hyperscript for the hast -> html conversion which does indeed have a concept of multiple elements at the root node. Fixes #157
koraa
added a commit
that referenced
this issue
Jan 18, 2019
This wrapping div would be added when there was more then one element in the markdown (which is the usual case) by hyperscript because hyperscript has no concept of multiple elements in the root node. Our code came to expect this wrapping which led to markdowns with a single element being rendered as an empty document in some cases (the single element would be deleted during the emit-html when generating .content.children). This commit fixes this issue by using hast-util-to-html instead of hyperscript for the hast -> html conversion which does indeed have a concept of multiple elements at the root node. Fixes #157
koraa
added a commit
that referenced
this issue
Jan 18, 2019
This wrapping div would be added when there was more then one element in the markdown (which is the usual case) by hyperscript because hyperscript has no concept of multiple elements in the root node. Our code came to expect this wrapping which led to markdowns with a single element being rendered as an empty document in some cases (the single element would be deleted during the emit-html when generating .content.children). This commit fixes this issue by using hast-util-to-html instead of hyperscript for the hast -> html conversion which does indeed have a concept of multiple elements at the root node. Fixes #157
koraa
added a commit
that referenced
this issue
Jan 18, 2019
This wrapping div would be added when there was more then one element in the markdown (which is the usual case) by hyperscript because hyperscript has no concept of multiple elements in the root node. Our code came to expect this wrapping which led to markdowns with a single element being rendered as an empty document in some cases (the single element would be deleted during the emit-html when generating .content.children). This commit fixes this issue by using hast-util-to-html instead of hyperscript for the hast -> html conversion which does indeed have a concept of multiple elements at the root node. Fixes #157
koraa
added a commit
that referenced
this issue
Jan 18, 2019
This wrapping div would be added when there was more then one element in the markdown (which is the usual case) by hyperscript because hyperscript has no concept of multiple elements in the root node. Our code came to expect this wrapping which led to markdowns with a single element being rendered as an empty document in some cases (the single element would be deleted during the emit-html when generating .content.children). This commit fixes this issue by using hast-util-to-html instead of hyperscript for the hast -> html conversion which does indeed have a concept of multiple elements at the root node. Fixes #157
koraa
added a commit
that referenced
this issue
Jan 25, 2019
This wrapping div would be added when there was more then one element in the markdown (which is the usual case) by hyperscript because hyperscript has no concept of multiple elements in the root node. Our code came to expect this wrapping which led to markdowns with a single element being rendered as an empty document in some cases (the single element would be deleted during the emit-html when generating .content.children). This commit fixes this issue by using hast-util-to-html instead of hyperscript for the hast -> html conversion which does indeed have a concept of multiple elements at the root node. Fixes #157
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Single element inside markdown is not being printed.
This seems to be caused by the markdown parser not generating a surrounding
<div>
for single elementmarkdown, which the
emit
pipeline step expects:document.body.firstChild.childNodes
.We could either 1) make sure we generate the
<div>
for single element markdowns 2) never generate the div (as most markdown generators do)and add it later 3) handle that case in
emit
specifically.The text was updated successfully, but these errors were encountered: