Martin Mitas
1d8a4e7294
README.md: Minor update.
2016-11-24 16:09:44 +01:00
Martin Mitas
b712bc560e
README.md: Update.
2016-11-24 15:44:58 +01:00
Martin Mitas
8a5402740f
README.md: Add section about encoding.
2016-11-24 15:40:01 +01:00
Martin Mitas
a930e46fc6
Fix build with MSVC.
2016-11-24 15:04:47 +01:00
Martin Mitas
6a1268a7e0
README.md: Update.
2016-11-24 14:36:16 +01:00
Martin Mitas
54028ed705
Implement ordered lists.
2016-11-24 14:16:47 +01:00
Martin Mitas
ce319c19ab
README.md: Fix some wording.
2016-11-24 13:16:22 +01:00
Martin Mitas
9455688192
Fix some corner cases with blank lines.
2016-11-24 13:15:24 +01:00
Martin Mitas
61f9e2cbed
Implement block quotes.
2016-11-24 13:15:23 +01:00
Martin Mitas
b86c7f2867
Implement unordered lists.
2016-11-24 13:15:16 +01:00
Martin Mitas
0887820d30
Remove parsing of block quotes.
...
It is implemented in a wrong way and cannot be reasonaly extended to
support other container blocks like lists.
2016-11-23 13:37:16 +01:00
Martin Mitas
2d2086aa05
md_is_table_underline: Check there is at least one pipe on the line.
2016-11-23 11:20:25 +01:00
Martin Mitas
4468c7aad7
md_setup_fenced_code_detail: Make sure we don't iterate beyond document end.
...
(CID 982106)
2016-11-22 03:16:30 +01:00
Martin Mitas
738fb3b81a
Fix parsing link reference definitions with line breaks.
2016-11-21 15:42:34 +01:00
Martin Mitas
16fbd061ec
md_is_inline_link_spec: Fix setting of *p_end.
2016-11-21 15:15:41 +01:00
Martin Mitas
be7fcc16ff
Implement tables.
...
Note it is implemented as an extension. To enable it, the flag MD_FLAG_TABLES
must be explicitly specified.
2016-11-21 13:39:45 +01:00
Martin Mitas
77d5eee788
md_is_setext_underline: On succeess, update p_end to save caller some work.
2016-11-21 10:33:52 +01:00
Martin Mitas
9f1c4b580d
Fix macro MD_FLAG_PERMISSIVEAUTOLINKS.
2016-11-21 09:48:08 +01:00
Martin Mitas
b00392c1b0
Fix gcc warning in Release build.
2016-11-21 02:48:29 +01:00
Martin Mitas
7d7d3b407c
md2html: Implement URL escaping.
2016-11-21 02:41:39 +01:00
Martin Mitas
20434c8a1a
Implement images.
2016-11-21 02:08:34 +01:00
Martin Mitas
2e96328ef6
Use first matching link reference definition.
2016-11-21 00:27:03 +01:00
Martin Mitas
5b5c8e7bb0
md_analyze_simple_pairing_mark: Fix handling of the "rule of three".
2016-11-21 00:17:25 +01:00
Martin Mitas
342343b682
Fix prcessing of link contents.
2016-11-21 00:08:33 +01:00
Martin Mitas
d4c01063c2
Update README.md.
2016-11-20 23:02:39 +01:00
Martin Mitas
6959baec3b
Implement inline links.
2016-11-20 22:56:08 +01:00
Martin Mitas
082a4c0159
Fix gcc warnings when building Release build.
2016-11-20 02:17:01 +01:00
Martin Mitas
08cc1df945
When dealing with nested links, only the inner one is recognized as one.
2016-11-20 01:44:50 +01:00
Martin Mitas
809e611b3c
Migrate to CommonMark pecification 0.27.
2016-11-20 00:57:32 +01:00
Martin Mitas
d5a8c6995b
md_consume_link_reference_definitions: Fix when link references do not compose whole block.
2016-11-20 00:48:36 +01:00
Martin Mitas
36643f4a44
md2html: Fix name of link attribute 'title'.
2016-11-20 00:16:16 +01:00
Martin Mitas
789a5b7178
Fix detection of link label with escapes and new lines.
2016-11-20 00:10:41 +01:00
Martin Mitas
1a2477952a
Implement link reference definitions and, partially, link references.
2016-11-19 23:48:24 +01:00
Martin Mitas
ef38ecbc5c
Refactor to enhance readability of the code.
...
Functions start with md_is_xxx() return TRUE (1) or FALSE (0) instead of 0
and -1. -1 is now reserved for real errors.
2016-11-19 15:20:55 +01:00
Martin Mitas
8f672646c1
Better Unicode support.
2016-11-19 15:20:47 +01:00
Martin Mitas
15a3a81fe8
Implement e-mail autolinks.
2016-11-11 16:56:00 +01:00
Martin Mitas
0d4b10667a
Refactorize to allow procesing more blocks at once.
2016-11-07 21:14:50 +01:00
Martin Mitas
1ba03589c0
md_collect_marks: Optimize the function.
...
Use character map for a fast path and minimize count of branches for
specially handled characters.
When profiling md2html on a larger documents with output redirected to
/dev/null to mitigate I/O, this function was quite a bottleneck.
It consummed about 33% of CPU cycles on a longer document input, with
this patch applied it drops down to 12%.
2016-11-07 21:13:52 +01:00
Martin Mitas
7c9f5982c6
Fix typo in debug output.
2016-11-07 21:13:52 +01:00
Martin Mitas
0ed6937657
md_analyze_lt_gt: Fix assertion condition.
...
The variable detected_end is valid only for 'is_raw_html' case.
2016-11-07 21:13:52 +01:00
Martin Mitas
7ada257faf
For Debug build, #define macro DEBUG.
2016-11-07 21:13:52 +01:00
Martin Mitas
302660b80a
Get rid of unneeded variables.
2016-11-07 21:13:52 +01:00
Martin Mitas
e5225137a4
scripts/coverity.sh: chmod 755
2016-10-24 10:58:23 +02:00
Martin Mitas
af03791316
md_is_html_declaration: Fix possible access beyond document buffer.
2016-10-14 23:29:48 +02:00
Martin Mitas
545b001697
README.md: Minor update.
2016-10-14 19:59:42 +02:00
Martin Mitas
ef5f230ffa
Implement permissive autolinks extensions.
...
With MD_FLAG_PERMISSIVEURLAUTOLINKS, we treat not overly complicated URLs
as autolinks even without '<' and '>'.
With MD_FLAG_PERMISSIVEEMAILAUTOLINKS, we treat not overly complicated
e-mail addresses as autolinks even without '<', '>' and without the
'mailto:' scheme.
Also expanded md2html utility and tests to cover these.
2016-10-14 19:56:05 +02:00
Martin Mitas
63a3141108
Minor comment cleanup.
2016-10-14 16:10:40 +02:00
Martin Mitas
b2a3090309
md_process_doc: Fix use after free (via realloc()).
...
pivot_line points into the lines[], so we must be sure we have a valid pointer after the realloc() when growing the array.
2016-10-14 11:07:31 +02:00
Martin Mitas
9013247e84
md_rollback: Optimize.
...
We skip over as many marks a possible in mot cases.
This fixes e.g. the pathological case generated by command
$ python -c 'print (("*a **a " * 65000) + "b" + (" a** a*" * 65000))'
2016-10-14 03:07:09 +02:00
Martin Mitas
2ce9548d1c
Minor cleanup.
2016-10-14 02:16:56 +02:00