diff options
author | Xavier Mendez <me@jmendeth.com> | 2015-04-08 00:18:20 +0200 |
---|---|---|
committer | Xavier Mendez <me@jmendeth.com> | 2015-04-08 00:18:20 +0200 |
commit | 5951df7980f75cc0619ef68e925e2a4481b6a0b8 (patch) | |
tree | b74e0a04df81b4a2f37d29bc893fe1460d7bbc0c /src | |
parent | 2b890c168326591e8d283cad7c2c9e6cb34d18db (diff) | |
parent | 2a4cf17c70e6572ed42cdca3ea7ca3e768ed17be (diff) | |
download | rust-hoedown-5951df7980f75cc0619ef68e925e2a4481b6a0b8.tar.gz |
Merge branch 'master' of https://github.com/hoedown/hoedown
Diffstat (limited to 'src')
-rw-r--r-- | src/document.c | 6 | ||||
-rw-r--r-- | src/html_smartypants.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/document.c b/src/document.c index 613fd6d..27c17b2 100644 --- a/src/document.c +++ b/src/document.c @@ -2752,6 +2752,10 @@ hoedown_document_new( memset(doc->active_char, 0x0, 256); + 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; @@ -2767,7 +2771,7 @@ hoedown_document_new( if (doc->md.linebreak) doc->active_char['\n'] = MD_CHAR_LINEBREAK; - if (doc->md.image || doc->md.link) + if (doc->md.image || doc->md.link || doc->md.footnotes || doc->md.footnote_ref) doc->active_char['['] = MD_CHAR_LINK; doc->active_char['<'] = MD_CHAR_LANGLE; diff --git a/src/html_smartypants.c b/src/html_smartypants.c index bbe4fc5..b0904da 100644 --- a/src/html_smartypants.c +++ b/src/html_smartypants.c @@ -313,6 +313,16 @@ smartypants_cb__ltag(hoedown_buffer *ob, struct smartypants_data *smrt, uint8_t size_t tag, i = 0; + /* This is a comment. Copy everything verbatim until --> or EOF is seen. */ + if (i + 4 < size && memcmp(text, "<!--", 4) == 0) { + i += 4; + while (i + 3 < size && memcmp(text + i, "-->", 3) != 0) + i++; + i += 3; + hoedown_buffer_put(ob, text, i + 1); + return i; + } + while (i < size && text[i] != '>') i++; |