Log

Author Commit Date CI Message
Martin Mitas e97d0250 2019-11-03T13:44:29 Link label comparision fixes. * md_link_label_cmp: To match the labels, the loop has to reach ends of the labels for both of them. * md_link_label_cmp_load_fold_info: Collapse consequtive whitespace into a single ' ' for the label comparison purposes. Fixes #96.
Martin Mitas 0354e1ab 2019-10-04T22:34:08 md_is_container_mark: Ordered list mark requires at least one digit. Fixes #95.
Martin Mitas 64a63d53 2019-10-03T20:21:00 README.md: Add link to commonmark-d as a port of MD4C for D language.
Martin Mitas 728f2af4 2019-10-03T20:09:33 md_build_ref_def_hashtable: Do not allocate more memory then needed. Fixes #94.
Martin Mitas ae5ca894 2019-07-12T08:44:53 md2html/CMakeLists.txt: Use INSTALL(TARGETS) instead of INSTALL(PROGRAMS). Fixes #88.
Martin Mitas 97606369 2019-07-07T11:19:21 Fix the last test case in latex-math.txt.
Martin Mitas 9e8b3548 2019-07-07T11:16:23 Simplify some assertions.
Martin Mitas 099ce69b 2019-07-07T11:15:44 Add missing file into git.
Martin Mitas 2e965941 2019-07-07T10:59:20 Add/improve docs for the LaTeX math spans.
Tilman Roeder 8bac86aa 2019-07-07T09:46:10 Added support for LaTeX math (#87) Addresses #86.
Craig Barnes f0de1990 2019-06-24T21:56:50 Add man page for md2html program (#85) Fixes #56
Martin Mitas 410bb419 2019-06-19T17:04:48 Bump version to 0.3.4.
Martin Mitas b2e60066 2019-05-30T15:59:22 README.md: Shorten an URL to improve line wrapping.
Martin Mitas ce8b5d94 2019-05-27T22:16:35 md_analyze_line: Blockquote with blank line can interrupt a paragraph. Fixes #83.
Martin Mitas 7d1cfbc1 2019-05-23T22:50:37 CHANGELOG.md: Fix some wording.
Martin Mitas c4e6ddc3 2019-05-20T21:27:20 md2html/render_html.h: Add extern "C" when included in C++. Seems some people desire to use the HTML renderer in C++ projects, so lets make this as the 1st step in making it easy :-)
Martin Mitas 346874e0 2019-05-20T21:03:47 Add and fill MD_BLOCK_CODE_DETAIL::fence_char accordingly. For the case of indented code block, it is left zeroed. Fixes #81
Martin Mitas 97dd1ba8 2019-05-20T14:16:48 Fix gcc warning at -Wpedantic. md4c.c:184:14: warning: ISO C forbids forward references to enumâ types [-Wpedantic] Fixes #79
Martin Mitas 4d926435 2019-05-19T22:40:08 md_analyze_line: Disallow the strcspn() optiomization path... for other platforms then Linux. glibc has well-optimized implementation which provides good boost, but (as measured one Windows), it can be also relatively small to our own path below. We can always enable that path for more platforms, if we get some data showing it has good impact.
Martin Mitas 0344a077 2019-05-19T22:10:17 md_analyze_line: Fix the fast path if the input contains zero character.
Martin Mitas 56f8bbb1 2019-05-19T15:12:32 Implement/improve some optimizations, both in the parser and HTML renderer.
Martin Mitas f281db0b 2019-05-19T11:51:10 CHNANGELOG.md: Minor typo and wording fixes.
Martin Mitas 51386164 2019-05-19T11:46:26 md_link_label_cmp: Fix handling non-trivial folding info. Fixes #78.
Martin Mitas 4f6a9e54 2019-05-19T10:46:26 Update Unicode support to 12.1. * scipts/build_*_map.py: Implement helper pythonic scripts used to generate some Unicode search maps and data for helper Unicode functions used in MD4C. This should simplify updating to future Unicode versions. * md_get_unicode_fold_info: Use data generated by the scripts. * md_is_unicode_whitespace__: Ditto. * md_is_unicode_punct__: Ditto.
Martin Mitas 267e82df 2019-05-16T22:59:45 md_is_[hex|dec]_entity_contents: Fix maximal entity length. Spec. version 0.29 limits the decimal character length to at most 7 decimal digits and hexadecimal character length to at most 6 hexadecimal digits. Fixes #77.
Martin Mitas aca5c27f 2019-05-16T22:48:08 test/spec.txt: Update from upstream head.
Martin Mitas 64a1bc37 2019-05-15T23:25:05 test/coverage.txt: Sort the regression test cases by the issue number.
Martin Mitas ef64fd38 2019-05-13T10:46:50 render_html.c: Improve RENDER_LITERAL to not cause warnings in MSVC 2017.
Martin Mitas 04c65c4c 2019-05-13T10:45:38 Build: Improve CMakeLists.txt compatibility with MSVC 2017.
Martin Mitas e091d160 2019-05-11T00:40:28 Fix previous incomplete commit.
Martin Mitas 51da223b 2019-05-11T00:11:44 Minor cleanup. * md_analyze_line: Use while() loop instead of bunch of gotos. * Remove some manual optimizations. The optimizing skills of compilers have improved in the recent years. With gcc 8.3 at -O3 there is no measurable change.
Martin Mitas d7a8ede0 2019-05-10T10:36:45 Bump version to 0.3.3.
Martin Mitas 74636f3b 2019-05-08T11:07:15 md_scan_for_html_closer: Fix typo in a comment.
Martin Mitas 919a0cc9 2019-05-08T07:38:33 test/*.txt: Fix some formatting.
Martin Mitas 1757ff55 2019-05-07T23:10:46 test/spec_tests.py: Make ready for spec.txt from cmark-gfm project. This allows easier checking of our GFM dialect compatibility.
Martin Mitas e43f73a3 2019-05-07T22:36:29 CHANGELOG.md: Supplement description of the issue #76.
Martin Mitas 83047d3e 2019-05-07T22:24:29 md_analyze_permissive_url_autolink: Improve. * Fix domain recognition so that it has to have at least two dot-delimited components. * Fix handling if parenthesis so that they have to form balanced pairs; i.e. the first ')' not having a preceding opener ends the path. Fixes #76.
Martin Mitas f8ed51c9 2019-05-05T16:11:21 md_analyze_line: Simplify. Move some common code from multiple branches to one (and more appropriate) place.
Martin Mitas 609dfb0b 2019-05-05T15:56:51 md_analyze_line: Treat blank lines inside a HTML block more carefully... ... with respect to the parent list containers. Fixes #10 (but now really).
Andrew Lindesay 5cf2000a 2019-05-05T11:23:14 Build: Fix a few sign-comparison issues This will fix a couple of issues where the GCC compiler (in strict mode) is complaining with "error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]".
Martin Mitas 95279131 2019-04-30T00:32:36 When undoing complete block from ctx->block_bytesp[], reset ctx->current_block properly. Fixes #74.
Martin Mitas 19504cad 2019-04-29T22:24:23 Revert "Build: With gcc and clang, enforce -std=c90." This reverts commit 716b6ca4448318df900eb22bb7a31499a827d905. Rationale: snprintf() not available in C90, so -std=c90 causes warnings on Linux.
Martin Mitas d4d10915 2019-04-29T19:03:16 Improve parsing of inline raw HTML. * Isolate some common code for scanning HTML closer into a new function so most HTML scanner functions reuse the same code. * Improve the scanning for the closer so that on failure we remember the range where no closer is present. So any later scanning attempts may fail early. Fixes #73.
Martin Mitas 716b6ca4 2019-04-17T15:01:03 Build: With gcc and clang, enforce -std=c90. See #71. This forces us to be more conservative in the future code changes, and make us more friendly mainly to some embedded compilers who are often behind the current state of art. Fix also related warnings and errors, as provided by gcc 8.1.0.
Shawn Rutledge d9a5a6f6 2019-04-17T14:18:14 Fix errors and warnings on INTEGRITY compiler It seems to be applying C90 (?) rules: initializers must be compile-time constants. Fixes #71.
Martin Mitas 7a6bf33c 2019-04-08T19:56:23 Bump version to 0.3.2
Martin Mitas 29dfdd91 2019-04-08T19:45:50 README.md and CHANGELOG.md: Update for spec 0.29.
Martin Mitáš d7920b9c 2019-04-08T19:35:06 Merge pull request #67 from mity/spec-0.29 This merges all changes for CommonMark specification 0.28 -> 0.29 transition.
Martin Mitas 98850288 2019-04-08T19:31:57 md_is_html_block_start_condition: Do not recognize <meta>. This change is mandated by specifiction 0.29.
Martin Mitas 734a7c82 2019-04-08T11:00:39 Allow link ref. defs. at the beginning of SeText headers.
Martin Mitas 5b78f295 2019-04-08T11:00:27 test/spec.txt: Update from upstream head.
Martin Mitas b7d3c1a3 2019-04-05T08:53:27 Fix handling EOLs inside a code span.
Martin Mitas 8994c382 2019-04-05T08:19:01 md_is_code_span: Follow new spec rules for space trimming.
Martin Mitas 2a7b97ed 2019-04-05T08:18:54 test/spec.txt: Update from upstream head.
Martin Mitas b8586987 2019-04-03T08:28:27 md_collect_mark: Add missing 'continue' to '~' branch. Fixes #69.
Martin Mitas 30bf5667 2019-03-27T02:04:49 md_is_link_destination: Use first char as an indicator... ... type of link destination we should try. If it is '<', then try only <>-styled link destination.
Martin Mitas 855a1bfc 2019-03-27T02:04:24 test/spec.txt: Update from upstream head.
Martin Mitas cccfb3d7 2019-03-26T16:59:52 md_is_html_block_start_condition: Fix starting condition 1 when EOF follows. Fixes #68
Martin Mitas 13672154 2019-03-26T15:10:12 md_is_container_mark: Check the indentation is not too big... If it is then it is rather an indented code block.
Martin Mitas 94c86fe2 2019-03-26T14:45:23 Revert "Fix problematic link destinations with angle brackets." The updated specification now explicitly requests the behavior we implemented before fixing #24. This reverts commit 2e0a74ba990e291ef4eace047d50af05ca81daef. Also remove associated regression test as it is no longer valid.
Martin Mitas 0959975a 2019-03-26T14:01:02 md_analyze_emph: Follow specs changes to the "rule of three".
Martin Mitas 003a551d 2019-03-26T13:51:03 Remove left-over commented out code.
Martin Mitas 6e49193e 2019-03-26T13:44:55 md_is_link_title: Link title must be delimited from link destination with a whitespace.
Martin Mitas 98968e22 2019-03-26T13:33:05 Update spec.txt from upstream head. (I previously used an updated revision of it by mistake.)
Martin Mitas 8f04d113 2019-03-26T13:06:21 md_is_link_destination_A: Link destination in <> can contain spaces.
Martin Mitas 44762161 2019-03-26T12:58:22 md_is_code_span: New rules for eating whitespace... ... after the opening and before the closing marker of a code span.
Martin Mitas eb6a221e 2019-03-26T11:58:17 md_is_opening_code_fence: Allow backtick... ... in info string of tilde-based fence.
Martin Mitas 1edd0c9c 2019-03-26T11:49:25 test/spec.txt: Update to current upstream HEAD.
Martin Mitas a80e2e1a 2019-03-18T00:49:55 md_is_setext_underline: Remove useless duplicated code.
Martin Mitas 1a248650 2019-03-16T09:39:00 Fix building with MD4C_USE_UTF16.
Martin Mitas 2670043f 2019-03-13T07:50:34 Bump version to 0.3.1
Martin Mitas 2dd96ab4 2019-03-12T09:56:11 Fix O(n^2) in handling the "rule of three". We had to break the list of potential '*' openers into multiple ones so we do not have to walk it when looking for matching length due to the "rule of three" for intraword delimiter runs. Fixes #63.
Martin Mitas b2108652 2019-03-11T21:13:15 md_analyze_line: Fix O(n^2) in thematic break handling. Fixes #66.
Martin Mitas 37104fc2 2019-03-11T20:26:58 md_is_code_span: Fix crash at EOF. Fixes #65.
Martin Mitas 966b8e39 2019-03-11T19:56:46 md_is_link_title: Stop on ')' lin ()-style title. Fixes #60.
Martin Mitas fc27108e 2019-03-11T19:55:08 test/pathological_tests.py: Output test durations.
Martin Mitas 53f65852 2019-03-11T19:03:34 test/spec.txt: Little update. Somehow we were having little different spec.txt version that the one from CommonMark repo tag 0.28. But we still pass all its compliance test suite.
Martin Mitas 089174b5 2019-03-11T13:59:53 CHANGELOG.md: Update.
Martin Mitas 17c9b32b 2019-03-10T18:23:39 Move autolink detection into md_collect_marks(). It has to be done at the same time as raw inline HTML and code spans.
Martin Mitas 685b7144 2019-03-10T11:20:39 Move codespan detection from md_analyze_backtick() into... md_is_code_span(), called from md_collect_marks(). We have to do this at the same time as detecting raw inline HTML to follow CommonMark priority requirements. Also it is done very differently now: When scanning for the closer mark, we remember (the latest) position of potential closers for all other lengths as well. This means that: (1) If we find it, we reduced the task because all subsequent scan shall begin after the closer. (2) If we do not find it, then we have to reach the end of the block and hence we then know (for every allowed marker length) the position of last such backtick sequence. (3) That makes the guaranty that any subsequent call with either succeed in its scan (and reduce the task even further); or that we shall be able to detect instantly there is no suitable closer. I.e. every call either reduces the task by O(n) scan (1); or collects all the data in O(n) because (2) happens at most once; or fails in O(1) (3). This makes O(n) guaranty of the function complexity. Fixes #59.
Martin Mitas 0cb61205 2019-03-10T10:50:23 Move raw inline HTML detection from md_analyze_lt_qt() into md_collect_marks(). Fixes #58: For resolving raw inline HTML the function tried closer with all potential openers, because raw HTML can have '<' inside of an attribute. However this caused O(n^2) for input like "<><><><><><><>...". We solved by handling raw HTML in earlier stage, directly in md_collect_marks(), where we can scan linerary forward. Fixes #61: As a side effect, this also fixes the issue that MD_FLAG_NOHTMLSPANS disabled also recognition of CommonMark autolinks.
Martin Mitas cbae1793 2019-02-18T11:55:17 md_analyze_line: Fix propagation of uninitialized variable. Actually it should not be harmful because the consumer should use the variable MD_CONTAINER::task_mark_off only when MD_CONTAINER::is_task flag is set and it that case the task_mark_off _is_ initialized. (CID 1476829)
Martin Mitas 30cfd4e3 2019-02-13T12:27:21 appveyor.yml: Fix syntax.
Martin Mitas e43ac60a 2019-02-13T12:25:27 appveyor.yml: CMake 3.13.3 seems to always equire path to project root.
Martin Mitas 7ca80c6f 2019-02-13T11:26:19 CHANGELOG.md: Add note about building as shared lib.
Martin Mitas 1ea4b3e2 2019-02-11T10:10:26 README.md + CHANGELOG.md: More updates.
Martin Mitas 2c1dddc1 2019-02-11T09:29:53 README.md: Minor update.
Martin Mitas 5a5f10ef 2019-02-10T23:08:54 CHANGELOG.md: Update for version 0.3.0.
Martin Mitas 00a70fea 2019-02-10T22:59:49 Bump version to 0.3.0
Martin Mitáš 8e01a769 2019-02-10T22:58:42 Implement task lists. (#50) Fixes #30.
Lisandro Damián Nicanor Pérez Meyer 0b95bcc9 2019-02-09T19:03:05 Fix installation path of pkgconfig file. If the package is compiled on a multiarch-enabled distribution (Debian and derivatives) the resulting md4c.pc file will have a m-a path in it. In this case it's better to install into LIBDIR.
Martin Mitas b9fcd470 2019-02-09T11:01:56 CHANGELOG.md: Update.
Martin Mitas d32aa2e0 2019-02-09T10:40:52 Fix conflict in parsing permissive autolinks and ordinary links. The issues is caused by the fact that we do not know exact position of permissive auto-link in time of md_collect_marks() because there is no syntax to mark its end on the 1st place. This causes that eventually, the closer mark in ctx->marks[] can be out-of-order somewhat. As a consequence, if some other mark range (e.g. ordinary link) shadows the auto-link, the closer mark may be left outside the shadowed range and survive till the phase when we generate the output. We fix by using an extra mark flag to remember we did really output the opener mark, and output the closer only in such case. Fixes #53.
Martin Mitas f1f2f306 2019-02-09T09:40:25 md_analyze_permissive_url_autolink: Minor cleanup.
Martin Mitas bfca107d 2019-02-08T09:23:20 Build: Allow again building MD4C as static lib. * On Windows, we build static lib by default, as there is no /usr/lib counterpart. * On other systems the shared lib is the default. * Use option BUILD_SHARED_LIBS to override it: $ cmake -DBUILD_SHARED_LIBS=ON path_to_root # to build shared lib $ cmake -DBUILD_SHARED_LIBS=OFF path_to_root # to build static lib
Lisandro Damián Nicanor Pérez Meyer 69fcc953 2019-02-07T16:04:16 Remove useless instructions. (#52) The library is built as a shared library by default. Adding a static configuration requires some more work, and probably not really needed, most people will just embed the code.
Lisandro Damián Nicanor Pérez Meyer 5f33d933 2019-02-07T15:54:25 Build md4c as a shared library. (#49) Build md4c as a shared library. - Define the current version in the main CMakeLists.txt, so it can be used within the project. - Define VERSION, SOVERSION and PUBLIC_HEADER as target properties. - Be able to install both libmd4c and md2html. - Create a pkg-config file. Fixes #48
Martin Mitas c340e78b 2019-02-06T04:59:26 md_analyze_inlines: Simplify the code path for table_mode.
Martin Mitas a6cf8ff6 2019-02-06T04:36:01 CHANGELOG.md: Small update.
Martin Mitas 67401e70 2019-02-06T04:31:25 md_analyze_inlines: Resolve table cell boundaries before links. This brings some corner cases closer to cmark-gfm. Also fixes #51.