summaryrefslogtreecommitdiff
path: root/src
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 /src
parent9858400cefef4d5ef96e19caeb554cd0b283d12e (diff)
Adjusted HTML output for fenced code to match #71 change.
Diffstat (limited to 'src')
-rw-r--r--src/html.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/html.c b/src/html.c
index 56d5dbb..aeec5f1 100644
--- a/src/html.c
+++ b/src/html.c
@@ -156,15 +156,15 @@ extern int blocks_to_html(block* b, bstring* result, bool tight)
case fenced_code:
escaped = escape_html(b->string_content, false);
cr(html);
- bformata(html, "<pre");
+ bformata(html, "<pre><code");
if (blength(b->attributes.fenced_code_data.info) > 0) {
escaped2 = escape_html(b->attributes.fenced_code_data.info, true);
info_words = bsplit(escaped2, ' ');
- bformata(html, " class=\"%s\"", info_words->entry[0]->data);
+ bformata(html, " class=\"language-%s\"", info_words->entry[0]->data);
bdestroy(escaped2);
bstrListDestroy(info_words);
}
- bformata(html, "><code>%s</code></pre>", escaped->data);
+ bformata(html, ">%s</code></pre>", escaped->data);
cr(html);
bdestroy(escaped);
break;