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

HTML block end condition with blank line that has space (U+0020) #135

Open
MurakamiShinyu opened this issue Dec 14, 2021 · 2 comments
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@MurakamiShinyu
Copy link
Member

Issue Details

VFMが準拠するCommonMark仕様で、HTML blockの終了条件として

End condition: line is followed by a blank line.

とあります。また、blank-line の定義として

A line containing no characters, or a line containing only spaces (U+0020) or tabs (U+0009), is called a blank line.

とあります。

したがって次のような HTML block の例で

<div class="custom">
  
  - List Item
  
</div>

- List Item の上の空白行に space (U+0020)があってもなくても結果は変わらないはずです。

しかし、vfmで試すとspaceがある場合、次の結果になります:

<div class="custom">- List Item</div>

spaceがない場合は次のように期待どおりの結果になります:

<div class="custom">
  <ul>
    <li>List Item</li>
  </ul>
</div>
@MurakamiShinyu MurakamiShinyu added the bug Something isn't working label Dec 14, 2021
@akabekobeko
Copy link
Member

覚書。

remark 本体 (CommonMark/GFM ) かプラグインの組み合わせなのか切り分ける必要あり。remark の場合は VFM v1.x で採用する系の開発が終わっていて micromark 版へ移行 = VFM v2.x に持ち越すことになるかもしれない。低リスクな対処療法でゆけるなら v1.x で検討する。

@akabekobeko akabekobeko added this to the v1.1.x milestone Dec 14, 2021
@akabekobeko
Copy link
Member

とりあえず 1.1.x としておく

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

No branches or pull requests

2 participants