Skip to content

Commit

Permalink
only set active_char if extension is on
Browse files Browse the repository at this point in the history
  • Loading branch information
blaenk committed Jan 31, 2015
1 parent 9b789d2 commit c641dc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -2751,7 +2751,11 @@ hoedown_document_new(

memset(doc->active_char, 0x0, 256);

if (doc->md.emphasis || doc->md.double_emphasis || doc->md.triple_emphasis || doc->md.underline) {
if (extensions & HOEDOWN_EXT_UNDERLINE && doc->md.underline) {
doc->active_char['_'] = MD_CHAR_EMPHASIS;
}

if (doc->md.emphasis || doc->md.double_emphasis || doc->md.triple_emphasis) {
doc->active_char['*'] = MD_CHAR_EMPHASIS;
doc->active_char['_'] = MD_CHAR_EMPHASIS;
if (extensions & HOEDOWN_EXT_STRIKETHROUGH)
Expand Down

0 comments on commit c641dc1

Please sign in to comment.