-
-
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
spec: Switch to control auto-sectioning #155
Labels
spec
Spec related thing
Comments
MurakamiShinyu
added a commit
that referenced
this issue
Oct 11, 2023
…shes This add the following heading auto-sectioning rule: - Do not sectionize if the heading line starts with `#`s and ends with equal or greater number of `#`s. - `### Not Sectionize ###` (enclosed by equal number of `#`s) -- not sectionize - `### Sectionize ##` (insufficient number of closing `#`s) -- sectionize resolves #155
akabekobeko
pushed a commit
that referenced
this issue
Oct 12, 2023
…shes (#172) This add the following heading auto-sectioning rule: - Do not sectionize if the heading line starts with `#`s and ends with equal or greater number of `#`s. - `### Not Sectionize ###` (enclosed by equal number of `#`s) -- not sectionize - `### Sectionize ##` (insufficient number of closing `#`s) -- sectionize resolves #155
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update 2022-10-01 開発者会議 での討論の結果、 見出し記法の
## 見出し ##
の終わりの##
(先頭の##
と同じ数)がある場合に自動section囲みをしないことにすることで、section囲みにするかしないかを切り替えられるようにするという案(by @nosuke23)を採用することに決定。よって、以下の最初の提案(自動section囲みにする見出しを制限するvfmのオプション設定、デフォルトは h1 を除外)は取り下げ。
vfmでは文書内の最初の見出しが、文書のタイトル(HTMLのtitle要素)になる。それなのに、その最初の見出しは自動的にsectionで囲まれる。つまり最初のsectionの見出しとなる。
最初の見出しでもsection囲みにするのはpandocのsection-divsの仕様を踏襲したためだが、見直すべきかもしれない。
最初の見出し(通常h1要素)はHTMLのbody要素の直下に生成され、その次の見出し(通常h2要素)からsection囲みになるほうが、HTML文書構造として自然ではないか。
自動section囲みにする見出しを制限するオプションがあるとよいかもしれない。
例えば、
--section-headings=h2-h4
という指定で h2, h3, h4 だけを自動section囲みにする。値all
ですべて(現在と同じ)、値none
でsection囲みなし。デフォルトは h1 を除外したh2-h6
とするのが適切だろう。関連issue:
The text was updated successfully, but these errors were encountered: