0

ここにタイトルがあります

ここに別の形式のタイトルがあります

ここに見出しがあります

これは別の形式の見出しです

# これは何ですか?

## そして、これは何ですか?

ソース...

Here is a title
===

# Here is a title in another format

Here is a heading
---

## Here is a heading in another format

# What is this?
===

## And what is this?
---

マークダウンがどのようにレンダリングされるかはわかりますが、仕様に見出しの 1 つの形式を優先するルールがあるかどうか、および両方の形式を同時に使用するテキストを処理する方法を知りたいです。

4

2 に答える 2

0

あなたの例はあまり「科学的」ではありません。<h1>ハッシュと<h2>下線を混ぜて逆にした場合に何が起こるかをテストしたことがないからです。

もちろん、これは実装によって異なりますが、Kramdown テストは次のとおりです。

$ cat foo.md
# mix h1 hash with h2 underline
----------------------------

## mix h1 underline with h2 hash
=============================
$ kramdown foo.md
<h1 id="mix-h1-hash-with-h2-underline">mix h1 hash with h2 underline</h1>
<hr />

<h2 id="mix-h1-underline-with-h2-hash">mix h1 underline with h2 hash</h2>
<p>=============================</p>
于 2013-07-12T02:15:27.653 に答える