Commit Graph

683 Commits

Author SHA1 Message Date
Martin Mitas
3d708ab21c Simplify logging. No <stdargs.h> needed. 2016-10-13 23:06:15 +02:00
Martin Mitas
684c80ced0 Implement "rule of three".
Since 0.26, CommonMark specifies intraword '*' or '_' marks cannot close
if sume of opening and closing mark chracters can be divided by three.
2016-10-13 22:38:16 +02:00
Martin Mitas
296c8318f8 Implement emphasis and strong emphasis. 2016-10-13 22:20:00 +02:00
Martin Mitas
ec6a1cb7a1 md_is_html_block_end_condition: Improve the function so we do just a single scan of lines inside the HTML block. 2016-10-13 19:31:05 +02:00
Martin Mitas
977ca3e1d1 md_collect_marks: Make a branch to be more friendly
... to CPU branch prediction.

This seems to have 20%-effect when bechmarking with md2html (and
output redirected to /dev/null) on my machine.
2016-10-13 18:35:48 +02:00
Martin Mitas
bb66cf835a Fix character classification checks to deal with signed as well usnigned char. 2016-10-13 18:28:13 +02:00
Martin Mitas
d6f4088058 Fix branching on initialized variable.
(Caught with Valgrind.)
2016-10-11 13:22:44 +02:00
Martin Mitas
9af285a67e Fix transforming a new line into space inside of a code span. 2016-10-11 12:02:08 +02:00
Martin Mitas
55f39e2a01 Fix #definition of MD_ASSERT and MD_UNREACHABLE for non-debug gcc builds. 2016-10-11 11:13:16 +02:00
Martin Mitas
a7899c057b Implement autolinks. 2016-10-11 02:46:41 +02:00
Martin Mitas
fec7b9e6fc md_is_html_tag: The tag name cannot contain ':', '.' or '_'. 2016-10-11 02:46:23 +02:00
Martin Mitas
c3e634087e scripts/run-tests.sh: Fix permissions. 2016-10-11 01:19:50 +02:00
Martin Mitas
8fd97d7840 scripts/run-tests.sh: Fix typo. 2016-10-11 01:11:21 +02:00
Martin Mitas
1cfc6a5f42 Incorporate the specification testsuite from CommonMark. 2016-10-11 01:10:11 +02:00
Martin Mitas
f6456e3563 Minor clean up of README.md. 2016-10-11 00:38:41 +02:00
Martin Mitas
2b740798ca Implement insecure character (NULL) replacement. 2016-10-11 00:36:39 +02:00
Martin Mitas
04c82c6c0f Optmize the structure MD_MARK for size. 2016-10-10 23:52:13 +02:00
Martin Mitas
a3c721b23f Refactorize/improve analysis of inlines. 2016-10-10 23:33:19 +02:00
Martin Mitas
978e04f900 Minor cleanup. 2016-10-09 01:12:56 +02:00
Martin Mitas
d9e28dc99e Fix: Code spans and raw HTML have same precedence. 2016-10-09 00:53:28 +02:00
Martin Mitas
de2338ece8 Fix: By default, do not collapse whitespace. 2016-10-09 00:42:30 +02:00
Martin Mitas
c217261d29 Fix: Handle empty blockquotes correctly. 2016-10-09 00:26:46 +02:00
Martin Mitas
feee62563f Fix: Blank line cannot be part of an indented code block if block quote level differs. 2016-10-09 00:16:55 +02:00
Martin Mitas
088ff08a7d Fix: Check fir indented code block with higher priority then for blockquote. 2016-10-09 00:09:02 +02:00
Martin Mitas
fcc100768e Fix: HTML block type 7 cannot interrupt paragraph. 2016-10-09 00:03:11 +02:00
Martin Mitas
d161268d41 Minor fixes. 2016-10-08 23:55:43 +02:00
Martin Mitas
762aee7f0d Fix: Check for HTML block continuation after checking for blockquote mark. 2016-10-08 23:37:02 +02:00
Martin Mitas
14090e2e93 md2html: Output new-line after "</blockquote>". 2016-10-08 23:30:49 +02:00
Martin Mitas
f99ad2e8c4 Fix: Fenced code info string can contain more then just a language name. 2016-10-08 23:22:24 +02:00
Martin Mitas
5864554ce8 Fix: Stop fenced code block if blockquote level changes. 2016-10-08 23:14:19 +02:00
Martin Mitas
9b69333197 Fix: Fence code block indetation base is defined by indentation of opening code fence. 2016-10-08 22:59:12 +02:00
Martin Mitas
5980578054 Fix: Handle empty and/or unclosed fenced code block. 2016-10-08 22:37:39 +02:00
Martin Mitas
dac9acdb46 Fix: Strip blank lines at start and end of indented code block. 2016-10-08 22:28:11 +02:00
Martin Mitas
fa112a2835 Fix: Do not right trim lines in code block. 2016-10-08 22:11:03 +02:00
Martin Mitas
269fed7076 Fix: Setext underline has to have same blokquote level to recognize it as such. 2016-10-08 22:06:20 +02:00
Martin Mitas
d65d95f0c5 Remove bogus duplicated piece of code. 2016-10-08 21:31:27 +02:00
Martin Mitas
e950096b53 Fix misdetection of HTML block starting condition type 7.
The condition cannot span over multiple lines.
2016-10-08 21:09:55 +02:00
Martin Mitas
dda885e7ab Fix parsing of settext header underline.
If indented, it is not header.
2016-10-08 21:03:10 +02:00
Martin Mitas
24ac7eadd8 Fix parsing of ATX headers.
If indented, it cannot be ATX header.
2016-10-08 20:58:32 +02:00
Martin Mitas
0832e11363 Fixes for parsing thematic breaks. 2016-10-08 20:58:24 +02:00
Martin Mitas
950b4d736c Fix handlint of '\t' in some situations. 2016-10-08 20:46:33 +02:00
Martin Mitas
4f65b45bd6 mplement raw HTML spans. 2016-10-08 20:04:38 +02:00
Martin Mitas
87b41e1aba Implement entities. 2016-10-07 21:00:04 +02:00
Martin Mitas
a284a382ea Implement code spans. 2016-10-07 02:49:37 +02:00
Martin Mitas
479a117937 Minor clean-up and refactorization. 2016-10-07 02:49:37 +02:00
Martin Mitas
7d7f0d06e0 scripts/run-commonmark-tests.sh: Make the script more robust. 2016-10-07 02:49:37 +02:00
Martin Mitas
60abbb2733 Improve documentation comment of MD_RENDERER. 2016-10-07 02:49:37 +02:00
Martin Mitas
931388c5ab LICENSE.md: Use MIT license canonical wording. 2016-10-07 02:49:37 +02:00
Martin Mitas
48e30ccf75 README.md: Improve readability by some minor reogranizing. 2016-10-06 12:55:57 +02:00
Martin Mitas
c2eca50a1c '\\' at the end of block does not cause hard break. 2016-10-05 11:33:25 +02:00