-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
<pre> タグのパースに失敗する #77
Comments
以下のテストを実行したところ、 it('<pre>', () => {
const actual = lib.stringify(`<pre>\n* * *\n * * *\n</pre>`);
const expected = `<pre>
* * *
* * *
</pre>`;
expect(actual).toBe(expected);
}); 問題が再現した。
if (is(node, 'pre') && maybeCode?.properties?.title) {
// if の判定で自明なので Optional Chaining 不要
const maybeTitle = maybeCode.properties.title;
} |
なお↑とは別件で <pre>
* * *
* * *
</pre> ではなく <pre>* * *
* * *
</pre> になる。ここは remark の CommonMark/GFM 担当部分だが |
CommonMark の動作検証 に指定したら <pre>
* * *
* * *
</pre> になっていた。本件を修正後に別 issue としてこの問題を登録予定。 |
↑は #79 として登録したので本 issue はクラッシュ修正のみを扱う。 |
@yamasy1549 なお本件調査で別件 #79 を見つけました。これは別途、調査します。 |
@akabekobeko 修正ありがとうございます 🙏 |
Issue Details
Expected Behavior
https://vivliostyle.github.io/vfm/#/vfm#raw-html によれば、VFM では生の HTML をそのまま出力するので、以下の出力が期待されます。
Actual Behavior
しかし、
<pre>
タグを含んだ文字列をパースしようとするとエラーが出ます。The text was updated successfully, but these errors were encountered: