Skip to content

Commit

Permalink
Wrap pre-code block inside div
Browse files Browse the repository at this point in the history
This prevents Prism from messing with styles.
  • Loading branch information
uranusjr committed Jan 1, 2016
1 parent efac0b8 commit ef19752
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MacDown/Code/Extension/hoedown_html_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void hoedown_patch_render_blockcode(
lang = mapped;
}

HOEDOWN_BUFPUTSL(ob, "<pre");
HOEDOWN_BUFPUTSL(ob, "<div><pre");
if (state->flags & HOEDOWN_HTML_BLOCKCODE_LINE_NUMBERS)
HOEDOWN_BUFPUTSL(ob, " class=\"line-numbers\"");
if (back && back->size)
Expand All @@ -81,7 +81,7 @@ void hoedown_patch_render_blockcode(
hoedown_escape_html(ob, text->data, size, 0);
}

HOEDOWN_BUFPUTSL(ob, "</code></pre>\n");
HOEDOWN_BUFPUTSL(ob, "</code></pre></div>\n");

hoedown_buffer_free(mapped);
hoedown_buffer_free(front);
Expand Down

0 comments on commit ef19752

Please sign in to comment.