Commit graph

25 commits

Author SHA1 Message Date
Tzu-ping Chung
2297a4e20b Fix rendering in table with empty cells
`find_emph_char` returns 0 if the char specified is not found in the
current line, but this is also what happens when there's an empty
cell. This patch adds logic to work around this problem.

See uranusjr/macdown#321
2015-05-16 00:54:24 +08:00
Jorge Israel Peña
9b789d24a5 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.
2015-01-30 19:02:37 -08:00
Steve Wolter
4825466fef Move test for formatting in table of contents to test/Tests directory.
MarkdownTest_1.0.3 directory is reserved for the standard tests from the
original Markdown spec.
2014-12-01 16:47:18 +01:00
Steve Wolter
737304d2aa Fix issue #125: Don't escape HTML tags in tables of contents.
Before this patch, a header like "# *A*" was displayed as
"<li>&lt;em&gtA&lt;/em&gt;</li>" in the TOC. The error was caused by
toc_header doing the HTML escaping. In the normal HTML renderer, the escaping
is done by the normal_text hook. This patch uses the same handling to
fix the issue.
2014-12-01 12:35:14 +01:00
Tzu-ping Chung
9585febb58 Make tests work on Windows 2014-10-22 13:12:03 +08:00
Xavier Mendez
5c6ef74739 Modify tests accordingly 2014-09-14 19:16:41 +02:00
Tzu-ping Chung
00a5b7abc2 Cleanup 2014-09-09 18:01:45 +08:00
Tzu-ping Chung
9a0c20d1ad Add "fail" flag for expected failure
Might be useful someday.
2014-09-09 17:57:58 +08:00
Tzu-ping Chung
855bc34742 Make test script Python 3-compatible 2014-09-09 17:48:42 +08:00
Tzu-ping Chung
9a2166db3c Cleanup 2014-09-09 17:26:47 +08:00
Tzu-ping Chung
6510aa4b76 Use difflib to make error friendly 2014-09-09 17:14:38 +08:00
Tzu-ping Chung
95ab7bb92f Enable escape character test 2014-09-09 17:14:16 +08:00
Tzu-ping Chung
b49d385be3 Add math test (modified) and tweak runner 2014-09-09 16:30:01 +08:00
Tzu-ping Chung
8cc788ec59 New Python implemented test script 2014-09-09 16:10:50 +08:00
Tzu-ping Chung
64a4267429 Fix escaping in char_link and add tests
Same logic as 2301e4c
2014-08-10 02:48:35 +08:00
Tzu-ping Chung
0c766248c9 Fix incorrect file name 2014-08-10 02:43:59 +08:00
Tzu-ping Chung
4a2c962369 Add test cases for escape characters 2014-08-10 02:16:34 +08:00
Craig Barnes
0dcf6d9156 Set permissions of named pipes created by the test runner to 0600 2014-01-24 00:24:10 +00:00
Craig Barnes
97a04e604f Make test runner clean up named pipes, even on early/forced termination 2014-01-23 20:06:41 +00:00
Craig Barnes
f6338a2006 Use mktemp(1) to generate temporary filenames used by the test runner 2014-01-23 19:30:09 +00:00
Craig Barnes
7b94616304 Return non-zero exit code from test runner if any tests fail 2014-01-23 16:54:21 +00:00
Craig Barnes
d3e36c51d6 Fix portability issues in test runner script 2014-01-23 06:36:48 +00:00
Craig Barnes
6621d8ef36 Add Bash test runner 2014-01-23 03:30:46 +00:00
Devin Torres
1c9393291e Exit 1 if tests fail for Travis 2013-09-20 19:56:49 -05:00
Devin Torres
f9227bba79 Import the official Markdown 1.0.3 test suite 2013-09-18 16:36:04 -05:00