From 2c06fa95fd3059a099bbe403beaf62f2e033f5b7 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Tue, 9 Sep 2014 03:42:05 +0200 Subject: Fix the class attribute for code fences --- src/html/html.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/html/html.c b/src/html/html.c index 129335f..74f6791 100644 --- a/src/html/html.c +++ b/src/html/html.c @@ -99,7 +99,7 @@ void blocks_to_html(strbuf *html, node_block *b, bool tight) case BLOCK_FENCED_CODE: cr(html); - strbuf_puts(html, "tag == BLOCK_FENCED_CODE) { strbuf *info = &b->as.code.info; @@ -109,14 +109,13 @@ void blocks_to_html(strbuf *html, node_block *b, bool tight) if (first_tag < 0) first_tag = strbuf_len(info); - - strbuf_puts(html, " class=\""); + strbuf_puts(html, " class=\"lang-"); escape_html(html, info->ptr, first_tag); strbuf_putc(html, '"'); } } - strbuf_puts(html, ">"); + strbuf_putc(html, '>'); escape_html(html, b->string_content.ptr, b->string_content.size); strbuf_puts(html, "\n"); break; -- cgit v1.2.3