Martin Mitas
6d35c73c5b
Minor cleanup.
2016-12-07 18:39:43 +01:00
Martin Mitas
f0175cfcb7
md_do_normalize_string: Fix checking whether we are done.
2016-12-07 15:08:41 +01:00
Martin Mitas
8f75477650
md_setup_fenced_code_detail: Fix size of temp. buffer.
2016-12-07 15:00:51 +01:00
Martin Mitas
4405d7970c
md_analyze_line: Fix prioritization of "brother" list item detection.
2016-12-07 14:29:49 +01:00
Martin Mitas
45a1027115
md_do_normalize_string: Fix handling of escaped backslash ("\\").
2016-12-07 13:43:54 +01:00
Martin Mitas
2928484250
Handle escapes in code fence info string.
2016-12-07 13:22:16 +01:00
Martin Mitas
75cee13ea7
Handle escape sequences in link titles.
2016-12-07 13:04:29 +01:00
Martin Mitas
2952438701
README.md: Minor update.
2016-12-05 23:53:30 +01:00
Martin Mitas
864da293d5
Fix typos.
2016-12-05 21:25:29 +01:00
Martin Mitas
6c90b37f12
More fixes and enhancements to Windows Unicode support (issue #3 ).
...
* Rename MD4C_USE_WIN_UNICODE to MD4C_USE_UTF16.
* Update and improve related documentation in README.md.
2016-12-05 21:21:16 +01:00
Martin Mitas
f9e58913ce
Rename MD4C_USE_UNICODE to MD4C_USE_UTF8.
2016-12-05 20:54:37 +01:00
Martin Mitas
7d20152c39
Fix UTF-16 sorrogate decoding (with -DMD4C_USE_UNICODE).
...
See https://github.com/mity/md4c/pull/1#issuecomment-264842360
2016-12-05 13:45:57 +01:00
tin-pot
0d10f6dbe2
md2html.c: No need for <stdint.h>
2016-12-05 12:34:29 +01:00
tin-pot
bc52610ebc
Fix signed/unsigned comparisons.
...
This removes a lot of MSVC warnings.
2016-12-05 12:21:07 +01:00
Martin Mitas
e6dc14e9a7
Fix md4c.c compilation with -DMD4C_USE_WIN_UNICODE.
2016-12-05 11:24:29 +01:00
Martin Mitas
23312d6d65
md_is_html_tag: Fix parsing unquoted attribute value (issue #2 ).
2016-12-05 11:13:43 +01:00
Martin Mitas
c5fa9a7094
md_analyze_line: Closing code fence cannot have list loosening effect.
2016-12-05 00:31:26 +01:00
Martin Mitas
17e6b940ce
md_resolve_links: Minor cleanup.
2016-12-04 20:53:47 +01:00
Martin Mitas
035dea495b
Fix crash caused by bad management of opener chains.
...
1. We need to reset (potentially used) chains after each mark analysis
phase. This ensures that md_rollback() does not try to play with
chains used in previous phases.
2. md_rollback() must never play with PTR_CHAIN.
2016-12-04 20:48:06 +01:00
Martin Mitas
578dea5b81
md_resolve_links: Remove possible invalid initialization.
2016-12-04 18:42:16 +01:00
Martin Mitas
bb23f79129
md_build_img_alt: Fix crash when dealing with some mark types.
...
For some mark types, it is possible that subsequent mark has lower 'beg'
then 'end' of the previous one.
This typically happens when an opener mark is expanded to cover whole
range to the closer.
2016-12-04 18:09:33 +01:00
Martin Mitas
b40d595044
Fix file permissions of python scripts.
2016-12-04 17:01:00 +01:00
Martin Mitas
4e416f1be1
md_analyze_line: Fix blank lines inside a fenced code block when nested in a container.
2016-12-01 22:09:38 +01:00
Martin Mitas
12b16001b7
md_analyze_line: Blank line inside a blockquote cannot have a list loosening effect.
2016-12-01 21:48:42 +01:00
Martin Mitas
3f95f06537
md_process_all_blocks: Fix decrementing of ctx->n_containers
...
when leaving blockquote.
2016-12-01 21:40:50 +01:00
Martin Mitas
b0ac9ef4d3
md_analyze_line: Ordered list can interrupt paragraph only if start index is 1.
2016-12-01 18:18:10 +01:00
Martin Mitas
c7083d88bf
md_process_all_blocks: Block quote cannot be "tight".
...
Block quote cannot "inherit" tightness of a (tight) enclosing list item.
2016-12-01 18:07:35 +01:00
Martin Mitas
203ed89218
md_analyze_line: Update MD_CONTAINER when switching to the brother list item.
2016-12-01 17:41:51 +01:00
Martin Mitas
52dea362d2
Handle empty list items.
2016-12-01 17:06:57 +01:00
Martin Mitas
93701fdbe3
md_process_inlines: Handle line breaks inside (inline) raw HTML.
2016-12-01 11:51:57 +01:00
Martin Mitas
25f0f13790
md_analyze_line: Use ctx->code_indent_offset rather then encoded 4.
2016-12-01 11:32:04 +01:00
Martin Mitas
e7908d566d
md_analyze_line: Handle better indentation after list item mark.
2016-12-01 11:29:42 +01:00
Martin Mitas
325f373ee7
md4c.h: Update docs comments.
2016-11-30 23:41:34 +01:00
Martin Mitas
13ce09b769
README.md: Update.
2016-11-27 03:03:16 +01:00
Martin Mitas
b43ef8e63a
md_link_label_eq: Treat new line as an unicode whitespace.
...
It fixes this:
[Foo
bar]: /url
[Baz][Foo bar]
2016-11-27 00:50:24 +01:00
Martin Mitas
e61a8158ca
Fix some by-one errors when handling escapes.
2016-11-27 00:39:54 +01:00
Martin Mitas
dee8142c37
Handle escapes in link destinations.
2016-11-27 00:37:22 +01:00
Martin Mitas
55afb5bae3
Fix typo.
2016-11-27 00:09:50 +01:00
Martin Mitas
ebaee39c84
Fix nesting of links and images.
2016-11-26 23:58:43 +01:00
Martin Mitas
d82bf9e0a0
md_is_container_mark: If indented as an indented code block, we cannot be a container start.
...
This fixes this:
> foo
- bar
2016-11-26 23:13:35 +01:00
Martin Mitas
4bb7cf8a4b
Fix handling a backslash inside an autolink.
...
This fixes this:
<http://example.com/ \[\>
2016-11-26 23:02:44 +01:00
Martin Mitas
159c2ee3f5
Fix counting line indentation if '\t' is present.
2016-11-26 22:48:19 +01:00
Martin Mitas
f1bd8b37c0
Fix handling of multi-backtick codespan mark if a backslash precedes.
...
So in this
\``code span`
the codespan is now correctly recognized.
2016-11-26 21:58:20 +01:00
Martin Mitas
2a70b3efa1
Limit length of code span marks to lower then 256 characters.
...
This protects against a pathologic case generated by
$ python -c 'print( "".join(map(lambda x: ("e" + "`" * x), range(1,10000))))'
2016-11-26 20:32:33 +01:00
Martin Mitas
4c96ac2626
Refactorize memory management of MD_LINK_REF_DEF structures.
2016-11-26 20:31:35 +01:00
Martin Mitas
aacbbfae64
Minor clean-up.
2016-11-26 14:08:27 +01:00
Martin Mitas
96a928089b
CMakeLists.txt: By default, do Release build.
2016-11-26 14:01:03 +01:00
Martin Mitas
09c7fd7f7c
md_text_with_null_replacement: Fix endless loop on a NULL character.
2016-11-25 15:17:01 +01:00
Martin Mitas
6fb7439c96
md_remove_line_breaks: Minor fixes.
2016-11-25 00:02:46 +01:00
Martin Mitas
3eba7f424c
md_analyze_line: End raw HTML block prematurely if enclosing container ends.
2016-11-24 23:50:06 +01:00