Skip to content
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

fix: fixed a crash when specifying the HTML pre tag #80

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

akabekobeko
Copy link
Member

#77 修正。

Markdown のコード ブロック変換と異なり <pre> の解析では if で判定している HAST の properties.title が存在しない。直後の処理では Optional Chaining で参照しているため、これを if 判定にすることで undefined 参照によるクラッシュを回避した。

if で参照が判定されるため直後の Optional Chaining は不要となる。

@akabekobeko akabekobeko added the bug Something isn't working label Apr 8, 2021
@akabekobeko akabekobeko self-assigned this Apr 8, 2021
@akabekobeko akabekobeko added this to the v1.0.0 milestone Apr 8, 2021
@akabekobeko akabekobeko merged commit e028c73 into master Apr 8, 2021
@akabekobeko akabekobeko deleted the fix-crash-html-pre-tag branch April 8, 2021 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant