kc3-lang/md4c

Branch :


Log

Author Commit Date CI Message
32995469 2024-02-13 15:46:13 Few assorted typo and wording fixes.
b85a5997 2024-02-07 15:05:44 CHANGELOG.md: Fix link to an issue #238.
aa53f82c 2024-02-07 11:44:39 Introduce an overall limit to link. ref. defs instantiations. This is to prevent time and output size explosion in case of input pattern generated by this: $ python -c 'N=1000; print("[x]: " + "x" * N + "\n[x]" * N)' We roughly allow to blowing up the input size of the document 16 times by link reference definitions or up to 1 MB, whatever is smaller. When the threshold is reached, following reference definitions are sent to output unresolved as a text. Fixes #238.
a16575e9 2024-02-07 12:19:30 CHANGELOG.md: Update.
ad8d4112 2024-02-04 02:03:12 Merge branch 'expand_ci'
d1f967f8 2024-02-04 02:00:19 CI: Remove bogus workflow step.
6c29f607 2024-02-04 01:51:20 Merge pull request #237 from mity/expand_ci Expand continouous integration
e7c4392c 2024-02-04 01:40:43 CI: Run test also on Windows runners.
94ad82ab 2024-02-03 23:16:48 CI: Rework Windows build jobs to use nmake rather than Visual Studio solution.
7dcbffe7 2024-02-03 22:57:14 CI: Add new job to make also Relase build on Linux.
30945d80 2024-02-01 22:16:22 md_is_link_label: Fix warning about potentially uninitialized variable... ... when build with gcc 13.2.0 in release build.
f37a89f5 2024-02-01 21:55:45 md_is_inline_link_spec: Use md_lookup_line() instead of walking. Fixes #236.
729e6b8b 2024-01-30 09:01:36 Bump version to 0.5.2.
485619fe 2024-01-30 01:46:15 test/spec.txt: Upgrade to spec version 0.31.2. It's essentially same as 0.31 and 0.31.1, it only fixes release date metadata in the spec.txt file. Also fix link in CHANGELOG.md accordingly.
f852aaed 2024-01-28 20:37:08 test/LICENSE: Update to reflect recent file renaming. Also rename the file to test/LICENSE.md.
1883132b 2024-01-28 19:05:39 Update test/spec.txt from upstream. (The spec 0.31 was released errorneously still with version 0.30 inside of it. Re-release 0.31.1 fixes it.)
2b8ad944 2024-01-28 09:45:15 Update CHANGELOG.md.
06b3ad82 2024-01-28 09:34:21 Merge pull request #208 from mity/specupd Update to CommonMark spec 0.31 and implement changes it mandates. * Any Unicode of general category P (punctuation) or S (symbol) is now seen as punctuation by the specification. * `<!-->` and `<!--->` are now recognized as HTML comments. * Tag `<source>` has been removed from list of tag trigerring HTML block comment type 4, whereas tag `<search>` added into the list.
584d3897 2024-01-28 09:16:47 Update CHANGELOG.md.
b0783f8c 2024-01-28 09:02:29 README.md: Update CommonMark spec reference to 0.31.
a44a1cf8 2024-01-11 11:29:29 Update tags for HTML block starting condition. Specifically, "<source>" has been removed, "<search>" added.
4aea320a 2024-01-09 02:25:05 md_is_html_comment: Reflect updated spec.txt. * Accept "<!-->" and "<!--->" as valid HTML comments. * HTML comment now can contain "--"
ef4dcd41 2024-01-09 02:54:25 Updated spec.txt expands what's recognized as Unicode punctuation. Namely all P and S general categories are now treated as punctuation.
136b39ac 2024-01-09 02:10:43 Update test/spec.txt from upstream.
5bd62241 2024-01-28 08:10:06 Fix warning about a shadowed variable (with -Wshadow). Fixes #234.
90f8d964 2024-01-26 10:23:36 Put all compiler option to one place and unify them for all targets. (And fix a newly triggered warning in md2html/md2html.c.)
3e8048db 2024-01-26 03:09:56 Improve/unify approach to line indexing. * Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetic if lines and replace it with line index arithmetic. This resolves some warnings in MSVC builds. See PR #232. Co-authored-by: Martin Mitas <mity@morous.org> Co-authored-by: Shawn Rutledge <s@ecloud.org>
5178c585 2024-01-25 23:53:58 Fix uninitialized variable. This was regression introduced in the commit aeddaf587f5e3faceb2d88a45ef7987bdebfe837.
aeddaf58 2024-01-25 22:24:17 Simplify and fix handling of newline in code span. Fixes #223 properly (one corner case has been unnoticed/hidden due test suite normalization feature). Fixes #230 (strictly speaking duplicate of the corner case).
d082cdd8 2024-01-25 21:25:26 test/run-testsuite.py: Allow disabling normalisation on per-unittest basis. And use it for few tests in regressions.txt where the whitespace matters.
4933a893 2024-01-25 20:28:54 md2html: Add <meta charset="UTF-8"> with output with --full-html. Fixes #231.
f46000c7 2024-01-24 09:49:59 Use UTF-8 in copyright notes.
533b8331 2024-01-24 09:48:53 md2html/cmdline.[ch]: Update from upstream.
2cb4f23f 2024-01-22 09:14:58 md_collect_marks: Improve pre-test for '.'.
23e7929b 2024-01-22 09:10:25 md_analyze_permissive_autolink: Check left boundary asap.
798b0bf2 2024-01-21 16:30:02 codecov.yml: Remove the file. We used it to exclude code coverage stats for md2html, but there's no reason to do so anymore.
12df389a 2024-01-21 16:28:48 ci-build.yml: Explicitly name the checkout step.
610bfdb5 2024-01-21 16:19:31 Migrate from codecov bash uploader to github action.
fcd3ca13 2024-01-21 15:20:49 Fix source indentation.
a3c510ac 2024-01-21 14:11:47 Improve coverage testing of UTF-8 routines.
cd7c326f 2024-01-21 13:20:38 Add code coverage test for MD_FLAG_COLLAPSEWHITESPACE.
83e093fb 2024-01-21 11:50:18 md_opener_stack: Mark the default branch of switch as unreachable. We were returning NULL previously, but that would lead to a crash anyway; all callsites expect to get their respective stack anyway and anything else would mean we are internally broken.
0672f27c 2024-01-21 11:45:02 md_process_table_row: Remove not needed freeing of ptr_stack. This is already handled universally in md_process_normal_block_contents() which is called from md_process_table_row() via md_process_table_cell().
faf39849 2024-01-21 11:42:30 md_is_html_cdata: Remove not needed max_end shrinking. md_scan_for_html_closer() handles that internally.
dec252d4 2024-01-21 10:39:06 Bump version 0.5.1 and update CHANGELOG.md.
65957f53 2024-01-19 10:37:33 Limit number of table columns to prevent explosion of output... with the input pattern in the form of geneated by this one-liner: $ python3 -c 'N=1000; print("x|" * N + "\n" + "-|" * N + "\n" + "x\n" * N)' Here the amount of HTML otput grows with N^2.
70b247cf 2024-01-19 13:59:45 md_analyze_permissive_autolink: Accept path ending with '/'. Fixes #226.
bbb43fe0 2024-01-18 17:30:44 Rename PUSH_MARK() to ADD_MARK(). This is to pevent confusion with opener stack operations.
246e105d 2024-01-18 17:22:54 Refactor mark chains. (#224) * Rename MD_MARKCHAIN to MD_MARKSTACK to indicate its semantics much clearer. * Simplify its implementation (single-linked list instead of double-linked one). * Where it was reused (misused?) for other, unrelated stuff, with other semantics, it's now done explicitly. (i.e. got rid of TABLECELLBOUNDARIES). * PTR_CHAIN still uses the stack (we don't care about order there), but it got separated from the array of ordinary opener stacks at least.
601ff053 2024-01-18 16:28:16 Fix handling new line at beginning/end of a code span. Fixes #223.
c076698a 2024-01-18 16:10:46 md_collect_marks: Get rid of helper vars line_beg, line_end.
23b14168 2024-01-18 15:11:22 pathological-tests.py: Fix output if a test unit ends with non-zero exit code.
08728831 2024-01-18 13:39:48 md_rollback: Update outdated comment.
d40458b5 2024-01-18 12:39:36 md_rollback: Simplify the function. We assume the provided opener_index and closer_index do not cross boundaries of already resolved ranges. Previously the function tried deal with such situation but this code should not be needed, it was very complex and, most importantly, broken anyway.
a08f6a05 2024-01-18 12:29:31 Improve/fix latex math extension. To mitigate false positives: * We accept $ and $$ as a potential opener only if it's not preceded with alnum char. * Similarly closer cannot be followed with alnum char. * We now also match closer with last preceding pontential opener, not the first one. (And to avoid nesting, any previous openers are ignored.) * Also revert an unintended change in 3fc207affaba313cc1f4ef3b4e9e57df89b0e028 which allowed keeping nested resolved marks in it.
3fc207af 2024-01-18 10:56:12 Handle e-mail autolinks in a safer way. For standard e-mail autolinks <user@host> we internally transformed '<' into '@' (permissive e-mail autolink) to unify handling of missing "mailto:" needed into the destination attribute. This is now not true anymore and we handle that specially. It is actually what has bitten us in https://oss-fuzz.com/testcase-detail/4815193402048512. Even though this isn't the root cause of the issue, this change makes the code safer and easier to understand.
4728cd98 2024-01-17 16:04:14 md_analyze_tilde: Pop from chain tail like other emphasis. The function incorrectly used header from the head, leading to wrong result (incompatible with e.. GFM) but even worse to bad internal state md_rollback() is then potentially unable to solve. Fixes #222.
006611b9 2024-01-17 15:03:00 md_analyze_dollar: Call md_rollback() only when resolving. Fixes #221.
2ba5e2c6 2024-01-17 14:48:57 Make --replay-fuzz friendlier to work with in debugger. We make effectively input zero-terminated so debugger doesn't attempt to write more than what's really provided.
f45dd442 2024-01-17 02:58:12 Add regression test for #213. As it's now possible to add tests with multiple cmdline options easily.
d955c495 2024-01-17 02:48:57 Rework permissive autolinks. (#220) * We have now dedicated run over the inline marks for them. * We check more throughly whether it really looks as an URL or e-mail address. The old implementation recognized even heavily broken ones. * This allows us to be much more careful in order not to cross already resolved marks. * Share substantial parts of the code between all three types of the permissive autolinks (URL, WWW, e-mail). * Merge their tests into one file, spec-permissive-autolinks.txt. * Add one pathological case which triggered quadratic behavior in the old implementation.
a715b884 2024-01-16 15:29:35 Rename many files in test dir for better organization.
4b9e4d7c 2024-01-16 15:32:21 Move one more forgotten regression test to regressions.txt.
20cb7445 2024-01-16 15:10:57 Merge branch 'test_opts'
6685df9c 2024-01-16 15:09:33 Move all regression tests into new tests/regressions.txt. (And update scripts/run-tests.sh accordingly.)
74e5f7a9 2024-01-16 14:56:09 Tests: Specify md2html command line options for each example as needed. Previously the caller (or the script scripts/run_tests.sh) needed to know what options to specify.
359406bf 2024-01-16 14:25:46 Test: Add support for per-example command line options. (We also removed direct call support into the library. It was inherited from cmark as the testsuite was originally taken from there, but it actually was never updated to work with MD4C.)
0ac9f35d 2024-01-16 09:53:41 md_analyze_marks: Skip analyzing marks if... they fall into range of previously analyzed mark. That can happen if the previous mark has been expanded. That typically happens for permissive auto-links. This fixes one case of pathologic input leading to quadratic behavior.
b6777d78 2024-01-16 01:30:59 Wiki-links extension: Search for '|' only outside resolved ranges.
afeece29 2024-01-15 23:03:21 Fix line indentation calculation when interrupting list... due the "list item cannot begin with two blank lines" rule.
481230f4 2024-01-15 08:34:21 Bump version to 0.5.0.
4b5dd10e 2024-01-13 15:04:31 README.md: Add imgui_md to Software using MD4C. (And sort the items alphabetically.)
716da8b0 2024-01-13 11:44:27 CHANGELOG.md: Fix typo.
cf1226dd 2024-01-13 03:14:13 Update CHANGELOG.md.
78829427 2024-01-13 02:59:35 Fix some emphasis parsing issues. * We incorrectly applied the infamous rule of three only to asterisk-encoded emphasis, it has to be applied to underscore as well. * We incorrectly applied the rule of three only if the opener and/or closer was inside a word. It has also to be applied if the mark is both preceded and followed by punctuation. Fixes #217.
5592352f 2024-01-13 00:30:08 HTML declaration doesn't require whitespace before the closer. Fixes #216.
7497ea92 2024-01-13 00:17:08 Allow tabs after setext header underline. Fixes #215.
2750d9fa 2024-01-13 00:02:12 Add tags <h2>...<h6> as triggers for HTML block type 6. Fixes #214.
0d10b60b 2024-01-12 22:44:31 Move test/fuzz-input/ to test/fuzzers/seed-corpus/.
4a64fee2 2024-01-11 13:12:55 Bump copyright years.
5204c30d 2024-01-11 12:41:40 md_is_html_block_end_condition: Fix return value.
f32a861e 2024-01-11 12:20:23 md_end_current_block: Fix EOL handling.
76abc636 2024-01-11 12:09:22 md_is_html_block_end_condition: Fix EOF handling.
4a7246de 2024-01-11 11:55:38 md_is_inline_link_spec: Fix EOL checking.
af96a3f4 2024-01-11 10:57:02 ci-fuzz.yml: Reenable "Upload Sarif" step. See https://github.com/google/oss-fuzz/issues/10915.
3e576b49 2024-01-11 10:49:05 Rename the fuzz test workflow.
407b107e 2024-01-11 10:42:27 ci-fuzz.yml: .yml cannot have multiple "if" in one step.
59330842 2024-01-11 10:39:52 ci-fuzz.yml: Disable step "Upload Sarif". (It got in from the oss-fuzz's example cifuzz.yml, but IDK even what it is so hopefully we can live without it.)
85b971a3 2024-01-11 10:01:00 Try to fix ci-fuzz.yml by fixing indentation.
722cacad 2024-01-11 09:56:07 Try to fix ci-fuzz.yml by removing permissions {}. cmark doesn't have that line either.
87d4f063 2024-01-11 09:50:58 Enable CI fuzzing via oss-fuzz project. Should perform some initial 10 min fuzz testing on pull requests.
e25ea3d1 2024-01-11 03:34:24 Update list of named entities.
35ca9b0b 2024-01-11 01:09:35 Wording improvements in README.md.
3209f970 2024-01-11 01:06:59 Update CHANGELOG.md.
c6535ff3 2024-01-10 21:39:24 Fix eof handling in a middle of task list item.
ebbb12e5 2024-01-10 20:29:02 Revert most of PR #168 i.e of the commit f436c3029850c138e54a0de055d61db45130409e. It added bunch of checks all over the place, but most of them shouldn't be needed: If they are true, our internal state is already broken. In other words, those checks are hiding real bugs and making debugging harder. Hopefully the underlying bugs are already fixed in some of previous commits addressing some fuzzing issues, like these: * d775b5103ee130edbd808e21d1da6ca75f76a558 * c6942ef03ed46a67bd9b3af8ce1eefd781622777
d775b510 2024-01-10 18:33:32 More fixes of TABLECELLBOUNDARIES chain handling. Fixes #213.
821477b1 2024-01-10 17:35:46 Fix typo in fuzz-mdhtml.c, preventing oss-fuzz from working.
c6942ef0 2024-01-10 17:31:55 Treat TABLECELLBOUNDARIES chain as special one. It's not an ordinary openers chain as (most of) the others, and md_rollback() must not touch it. Fixes #212.
338e0bb2 2024-01-10 17:30:51 md2html: Add undoc'ed debug option --replay-fuzz. This helps to reproduce issues found by oss-fuzz project.