only set active_char if extension is on

This commit is contained in:
Jorge Israel Peña 2015-01-31 00:02:28 -08:00
parent 9b789d24a5
commit c641dc1436

View file

@ -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)