diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-09-06 19:38:57 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-09-06 19:38:57 -0700 |
commit | 9858400cefef4d5ef96e19caeb554cd0b283d12e (patch) | |
tree | a447beba63c6c6b3897f73981e71010b5edb5bf6 | |
parent | ea7961d54c973a1bad276cacb4ded8337482107c (diff) | |
parent | 14071dfaffc734d3be990a1aaba6da5149eb6df5 (diff) |
Merge pull request #71 from mathiasbynens/patch-1
Make fenced code blocks add the `class` to `code` rather than `pre`
-rw-r--r-- | spec.txt | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1286,9 +1286,9 @@ bar . An [info string](#info-string) can be provided after the opening code fence. -Opening and closing spaces will be stripped, and the first word -is used here to populate the `class` attribute of the enclosing -`pre` tag. +Opening and closing spaces will be stripped, and the first word, prefixed +with `language-`, is used as the value for the `class` attribute of the +`code` element within the enclosing `pre` element. . ```ruby @@ -1297,7 +1297,7 @@ def foo(x) end ``` . -<pre class="ruby"><code>def foo(x) +<pre><code class="language-ruby">def foo(x) return 3 end </code></pre> @@ -1310,7 +1310,7 @@ def foo(x) end ~~~~~~~ . -<pre class="ruby"><code>def foo(x) +<pre><code class="language-ruby">def foo(x) return 3 end </code></pre> @@ -1320,7 +1320,7 @@ end ````; ```` . -<pre class=";"><code></code></pre> +<pre><code class="language-;"></code></pre> . Info strings for backtick code blocks cannot contain backticks: @@ -3720,7 +3720,7 @@ blocks](#fenced-code-block): foo ``` . -<pre class="foo+bar"><code>foo +<pre><code class="language-foo+bar">foo </code></pre> . @@ -3813,7 +3813,7 @@ code blocks, including raw HTML, URLs, [link titles](#link-title), and foo ``` . -<pre class="föö"><code>foo +<pre><code class="language-föö">foo </code></pre> . |