summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-09-06 19:41:51 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-09-06 19:41:51 -0700
commitf5a456175cfde7bad10fad96e9fa17d357c8244a (patch)
tree9149b5853ed94187d948af27ac2881605415301e /js
parent9858400cefef4d5ef96e19caeb554cd0b283d12e (diff)
Adjusted HTML output for fenced code to match #71 change.
Diffstat (limited to 'js')
-rwxr-xr-xjs/stmd.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/stmd.js b/js/stmd.js
index 78ea89b..6895008 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -1478,9 +1478,10 @@ var renderBlock = function(block, in_tight_list) {
case 'FencedCode':
info_words = block.info.split(/ +/);
attr = info_words.length === 0 || info_words[0].length === 0 ?
- [] : [['class',this.escape(info_words[0],true)]];
- return inTags('pre', attr,
- inTags('code', [], this.escape(block.string_content)));
+ [] : [['class','language-' +
+ this.escape(info_words[0],true)]];
+ return inTags('pre', [],
+ inTags('code', attr, this.escape(block.string_content)));
case 'HtmlBlock':
return block.string_content;
case 'ReferenceDef':