summaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
authorJorge Israel Peña <jorge.israel.p@gmail.com>2015-01-30 19:02:37 -0800
committerJorge Israel Peña <jorge.israel.p@gmail.com>2015-01-30 19:02:37 -0800
commit9b789d24a52c6ebf4e86f6b7213eb669bfe03a71 (patch)
tree27597238a0bb827dcb58cd193dc108490a24e68a /test/Tests
parentfd09d02ca6e0ad6da3f24a832d2fe762268feafd (diff)
downloadrust-hoedown-9b789d24a52c6ebf4e86f6b7213eb669bfe03a71.tar.gz
allow the HOEDOWN_EXT_UNDERLINE to work
When the `HOEDOWN_EXT_UNDERLINE` extension was enabled, underlined spans would actually be passed verbatim to the output buffer. This was because the active_char was _only_ set when the emphasis, double_emphasis, or triple_emphasis handlers were registered. As a result, no active char was found in the input buffer, so everything was passed through verbatim. This patch fixes this by also registering the `active_char` if the underline handler is registered. I also added a simple regression test. I personally don't use this extension, but I encountered this bug over the course of writing bindings for Rust.
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Underline.html1
-rw-r--r--test/Tests/Underline.text1
2 files changed, 2 insertions, 0 deletions
diff --git a/test/Tests/Underline.html b/test/Tests/Underline.html
new file mode 100644
index 0000000..c2a8bba
--- /dev/null
+++ b/test/Tests/Underline.html
@@ -0,0 +1 @@
+<p>This <u>underline</u> will work.</p>
diff --git a/test/Tests/Underline.text b/test/Tests/Underline.text
new file mode 100644
index 0000000..8068546
--- /dev/null
+++ b/test/Tests/Underline.text
@@ -0,0 +1 @@
+This _underline_ will work.