We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<pre>
A new issue I found while trying to fix #77.
Markdown
<pre> * * * * * * </pre>
to HTML
Line break immediately after <pre> disappears.
<pre>* * * * * * </pre>
commonmark.js demo keeps line breaks as expected.
The text was updated successfully, but these errors were encountered:
最小構成で実装してみた。
import unified from 'unified' import remarkParse from 'remark-parse' import remarkRehype from 'remark-rehype' import refypeRaw from 'rehype-raw' import rehypeStringify from 'rehype-stringify' const main = () => { const md = `<pre> * * * * * * </pre>` unified() .use(remarkParse) .use(remarkRehype, { allowDangerousHtml: true }) .use(refypeRaw) .use(rehypeStringify) .process(md, (err, file) => { if (err) { console.error(err) } else { console.log(String(file)) } }) } main()
これを実行した結果は以下。
rehype-raw を外してみると HTML 開始タグは文字参照にエスケープされるが <pre> 直後の改行は維持されている。
<pre> * * * * * * </pre>
以上ををまとめると
のようだ。
Sorry, something went wrong.
VFM 自体の問題ではないこと、VFM 2.0 で remark を刷新することにより周辺 npm も変更されるので改善される可能性もあるため、本件は次バージョン送りとする。
akabekobeko
No branches or pull requests
Issue Details
A new issue I found while trying to fix #77.
Expected Behavior
Markdown
to HTML
Actual Behavior
Line break immediately after
<pre>
disappears.commonmark.js demo keeps line breaks as expected.
The text was updated successfully, but these errors were encountered: