mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
feat(subParsers/githubCodeBlock): add extra language class to conform to html5 spec
This commit is contained in:
parent
6176977558
commit
b7f5e32e1a
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -32,7 +32,7 @@ showdown.subParser('githubCodeBlocks', function (text, options, globals) {
|
|||
codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
|
||||
codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing whitespace
|
||||
|
||||
codeblock = '<pre><code' + (language ? ' class="' + language + '"' : '') + '>' + codeblock + end + '</code></pre>';
|
||||
codeblock = '<pre><code' + (language ? ' class="' + language + ' language-' + language + '"' : '') + '>' + codeblock + end + '</code></pre>';
|
||||
|
||||
return showdown.subParser('hashBlock')(codeblock, options, globals);
|
||||
});
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
|
||||
<p>And some HTML</p>
|
||||
|
||||
<pre><code class="html"><div>HTML!</div>
|
||||
<pre><code class="html language-html"><div>HTML!</div>
|
||||
</code></pre>
|
||||
|
|
Loading…
Reference in New Issue
Block a user