-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
spec: Prevent auto-generation of section elements by headings inside explicit parent element #152
Labels
spec
Spec related thing
Comments
This was referenced Sep 5, 2022
Fenced blocksを使う例::: {#sec01 .sec-lorem}
### Lorem {#h01 .h-lorem}
Lorem ipsum dolor sit amet.
::: ↓出力されるHTMLは次のようになるだろう: <section id="sec01" class="sec-lorem">
<h3 id="h01" class="h-lorem">Lorem</h3>
<p>Lorem ipsum dolor sit amet.</p>
</section> NOTE:
section以外の要素を使う例: ::: nav {#TOC .toc role="doc-toc"}
# Table of Contents {.toc-title}
1. [Chapter 1](#chap01)
2. [Chapter 2](#chap02)
3. [Chapter 3](#chap03)
::: ↓出力されるHTMLは次のようになるだろう: <nav id="TOC" class="toc" role="doc-toc">
<h1 id="table-of-contents" class="toc-title">Table of Contents</h1>
<ol>
<li><a href="#chap01">Chapter 1</a></li>
<li><a href="#chap02">Chapter 2</a></li>
<li><a href="#chap03">Chapter 3</a></li>
</ol>
</nav> Fenced blocks仕様の議論は: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
関連する仕様提案
明示的な親要素がある場合の見出しでは親要素の自動生成をせず、属性の移動・コピーをしないようにする。
例:
現在のvfmで出力されるHTML:
現状はこのように、明示的に section 要素があっても、もうひとつ余分な section 要素が出力されてしまう。これはあまり望ましいHTML出力ではない。
そこでこのような、HTMLブロックでの開始タグの後に見出しがある場合は、section要素の自動生成をしないようにする。また、spec: Fenced blocks内の見出しでも同様とする。
この仕様変更をおこなった場合の出力されるHTML:
section以外の要素を使う例:
現在のvfmで出力されるHTML:
この仕様変更をおこなった場合の出力されるHTML:
The text was updated successfully, but these errors were encountered: