Skip to content

Commit

Permalink
Merge pull request hoedown#151 from blaenk/underline-fix
Browse files Browse the repository at this point in the history
only set active_char if extension is on
  • Loading branch information
mildsunrise committed Jan 31, 2015
2 parents 59243b5 + c641dc1 commit 2a4cf17
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 2a4cf17

Please sign in to comment.