Commit Graph

683 Commits

Author SHA1 Message Date
Crypto City
659d6d2db0 build PIC
Some checks failed
Build and Test / linux-debug (push) Has been cancelled
Build and Test / linux-release (push) Has been cancelled
Build and Test / windows-32-debug (push) Has been cancelled
Build and Test / windows-64-release (push) Has been cancelled
2024-10-30 15:00:11 +00:00
Crypto City
10cf0e78de add a flag to allow any (most) characters in a url
Some checks failed
Build and Test / linux-debug (push) Has been cancelled
Build and Test / linux-release (push) Has been cancelled
Build and Test / windows-32-debug (push) Has been cancelled
Build and Test / windows-64-release (push) Has been cancelled
2024-10-27 09:28:24 +00:00
Martin Mitáš
481fbfbdf7
Check for hard breaks more carefully to avoid false positives...
... caused by trailing tab characters.

Fixes #250.
2024-02-25 20:51:06 +01:00
Martin Mitáš
64f36805b0
Fix handling tab when removing trailing whitespace.
Espacially in connection with ATX headers.
2024-02-25 16:24:50 +01:00
Martin Mitáš
3848bfb6cc Make striketrough spans follow same flanking rules...
... as other emphasis spans.

Fixes #242.
2024-02-21 09:09:31 +01:00
Martin Mitáš
057915e089
CI: Migrate codecov/codecov-action@v3 to @v4. (#241) 2024-02-17 15:01:46 +01:00
Martin Mitáš
329954690e
Few assorted typo and wording fixes. 2024-02-13 15:46:13 +01:00
Martin Mitáš
b85a59972f
CHANGELOG.md: Fix link to an issue #238. 2024-02-07 15:05:44 +01:00
Martin Mitáš
a16575e9f5 CHANGELOG.md: Update. 2024-02-07 14:45:09 +01:00
Martin Mitáš
aa53f82c29 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.
2024-02-07 14:45:09 +01:00
Martin Mitáš
ad8d41127b
Merge branch 'expand_ci' 2024-02-04 02:03:12 +01:00
Martin Mitáš
d1f967f82d
CI: Remove bogus workflow step. 2024-02-04 02:00:19 +01:00
Martin Mitáš
6c29f60737
Merge pull request #237 from mity/expand_ci
Expand continouous integration
2024-02-04 01:51:20 +01:00
Martin Mitáš
e7c4392cd1
CI: Run test also on Windows runners. 2024-02-04 01:46:01 +01:00
Martin Mitáš
94ad82abd0
CI: Rework Windows build jobs to use nmake rather than Visual Studio solution. 2024-02-03 23:19:18 +01:00
Martin Mitáš
7dcbffe75b
CI: Add new job to make also Relase build on Linux. 2024-02-03 22:57:14 +01:00
Martin Mitáš
30945d80f8
md_is_link_label: Fix warning about potentially uninitialized variable...
... when build with gcc 13.2.0 in release build.
2024-02-01 22:16:22 +01:00
Martin Mitáš
f37a89f5d7
md_is_inline_link_spec: Use md_lookup_line() instead of walking.
Fixes #236.
2024-02-01 22:14:36 +01:00
Martin Mitáš
729e6b8b32
Bump version to 0.5.2. 2024-01-30 09:01:36 +01:00
Martin Mitáš
485619fef7
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.
2024-01-30 01:46:15 +01:00
Martin Mitáš
f852aaed31
test/LICENSE: Update to reflect recent file renaming.
Also rename the file to test/LICENSE.md.
2024-01-28 20:37:08 +01:00
Martin Mitáš
1883132b4e
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.)
2024-01-28 19:05:39 +01:00
Martin Mitáš
2b8ad94463 Update CHANGELOG.md. 2024-01-28 09:45:15 +01:00
Martin Mitáš
06b3ad8283
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.
2024-01-28 09:34:21 +01:00
Martin Mitáš
584d389759 Update CHANGELOG.md. 2024-01-28 09:16:47 +01:00
Martin Mitáš
b0783f8cb4 README.md: Update CommonMark spec reference to 0.31. 2024-01-28 09:02:29 +01:00
Martin Mitas
a44a1cf89c Update tags for HTML block starting condition.
Specifically, "<source>" has been removed, "<search>" added.
2024-01-28 09:00:08 +01:00
Martin Mitas
4aea320a9e md_is_html_comment: Reflect updated spec.txt.
* Accept "<!-->" and "<!--->" as valid HTML comments.
* HTML comment now can contain "--"
2024-01-28 09:00:08 +01:00
Martin Mitas
ef4dcd41df Updated spec.txt expands what's recognized as Unicode punctuation.
Namely all P and S general categories are now treated as punctuation.
2024-01-28 09:00:08 +01:00
Martin Mitas
136b39ace0 Update test/spec.txt from upstream. 2024-01-28 09:00:08 +01:00
Martin Mitáš
5bd6224147 Fix warning about a shadowed variable (with -Wshadow).
Fixes #234.
2024-01-28 08:26:39 +01:00
Martin Mitas
90f8d9646f Put all compiler option to one place and unify them for all targets.
(And fix a newly triggered warning in md2html/md2html.c.)
2024-01-28 08:26:39 +01:00
Shawn Rutledge
3e8048db2b 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>
2024-01-26 21:41:38 +01:00
Martin Mitas
5178c585af Fix uninitialized variable.
This was regression introduced in the commit
aeddaf587f.
2024-01-25 23:53:58 +01:00
Martin Mitas
aeddaf587f 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).
2024-01-25 22:24:17 +01:00
Martin Mitas
d082cdd8fe test/run-testsuite.py: Allow disabling normalisation on per-unittest basis.
And use it for few tests in regressions.txt where the whitespace
matters.
2024-01-25 21:38:45 +01:00
Martin Mitas
4933a89317 md2html: Add <meta charset="UTF-8"> with output with --full-html.
Fixes #231.
2024-01-25 20:28:54 +01:00
Martin Mitas
f46000c7fc Use UTF-8 in copyright notes. 2024-01-24 09:49:59 +01:00
Martin Mitas
533b833121 md2html/cmdline.[ch]: Update from upstream. 2024-01-24 09:48:53 +01:00
Martin Mitas
2cb4f23f37 md_collect_marks: Improve pre-test for '.'. 2024-01-22 09:14:58 +01:00
Martin Mitas
23e7929bf4 md_analyze_permissive_autolink: Check left boundary asap. 2024-01-22 09:10:25 +01:00
Martin Mitas
798b0bf2af codecov.yml: Remove the file.
We used it to exclude code coverage stats for md2html, but there's no
reason to do so anymore.
2024-01-21 16:31:45 +01:00
Martin Mitas
12df389a71 ci-build.yml: Explicitly name the checkout step. 2024-01-21 16:31:45 +01:00
Martin Mitas
610bfdb510 Migrate from codecov bash uploader to github action. 2024-01-21 16:31:45 +01:00
Martin Mitas
fcd3ca13e3 Fix source indentation. 2024-01-21 15:20:49 +01:00
Martin Mitas
a3c510ac0b Improve coverage testing of UTF-8 routines. 2024-01-21 14:15:52 +01:00
Martin Mitas
cd7c326f1c Add code coverage test for MD_FLAG_COLLAPSEWHITESPACE. 2024-01-21 14:15:52 +01:00
Martin Mitas
83e093fbfc 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.
2024-01-21 12:10:46 +01:00
Martin Mitas
0672f27c0c 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().
2024-01-21 12:10:46 +01:00
Martin Mitas
faf39849db md_is_html_cdata: Remove not needed max_end shrinking.
md_scan_for_html_closer() handles that internally.
2024-01-21 12:10:46 +01:00