|
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.
|
|
98850288
|
2019-04-08T19:31:57
|
|
md_is_html_block_start_condition: Do not recognize <meta>.
This change is mandated by specifiction 0.29.
|
|
734a7c82
|
2019-04-08T11:00:39
|
|
Allow link ref. defs. at the beginning of SeText headers.
|
|
5b78f295
|
2019-04-08T11:00:27
|
|
test/spec.txt: Update from upstream head.
|
|
b7d3c1a3
|
2019-04-05T08:53:27
|
|
Fix handling EOLs inside a code span.
|
|
8994c382
|
2019-04-05T08:19:01
|
|
md_is_code_span: Follow new spec rules for space trimming.
|
|
2a7b97ed
|
2019-04-05T08:18:54
|
|
test/spec.txt: Update from upstream head.
|
|
b8586987
|
2019-04-03T08:28:27
|
|
md_collect_mark: Add missing 'continue' to '~' branch.
Fixes #69.
|
|
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.
|
|
855a1bfc
|
2019-03-27T02:04:24
|
|
test/spec.txt: Update from upstream head.
|
|
cccfb3d7
|
2019-03-26T16:59:52
|
|
md_is_html_block_start_condition: Fix starting condition 1 when EOF follows.
Fixes #68
|
|
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.
|
|
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.
|
|
0959975a
|
2019-03-26T14:01:02
|
|
md_analyze_emph: Follow specs changes to the "rule of three".
|
|
003a551d
|
2019-03-26T13:51:03
|
|
Remove left-over commented out code.
|
|
6e49193e
|
2019-03-26T13:44:55
|
|
md_is_link_title: Link title must be delimited from link destination with a whitespace.
|
|
98968e22
|
2019-03-26T13:33:05
|
|
Update spec.txt from upstream head.
(I previously used an updated revision of it by mistake.)
|
|
8f04d113
|
2019-03-26T13:06:21
|
|
md_is_link_destination_A: Link destination in <> can contain spaces.
|
|
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.
|
|
eb6a221e
|
2019-03-26T11:58:17
|
|
md_is_opening_code_fence: Allow backtick...
... in info string of tilde-based fence.
|
|
1edd0c9c
|
2019-03-26T11:49:25
|
|
test/spec.txt: Update to current upstream HEAD.
|
|
a80e2e1a
|
2019-03-18T00:49:55
|
|
md_is_setext_underline: Remove useless duplicated code.
|
|
1a248650
|
2019-03-16T09:39:00
|
|
Fix building with MD4C_USE_UTF16.
|
|
2670043f
|
2019-03-13T07:50:34
|
|
Bump version to 0.3.1
|
|
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.
|
|
b2108652
|
2019-03-11T21:13:15
|
|
md_analyze_line: Fix O(n^2) in thematic break handling.
Fixes #66.
|
|
37104fc2
|
2019-03-11T20:26:58
|
|
md_is_code_span: Fix crash at EOF.
Fixes #65.
|
|
966b8e39
|
2019-03-11T19:56:46
|
|
md_is_link_title: Stop on ')' lin ()-style title.
Fixes #60.
|
|
fc27108e
|
2019-03-11T19:55:08
|
|
test/pathological_tests.py: Output test durations.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
089174b5
|
2019-03-11T13:59:53
|
|
CHANGELOG.md: Update.
|
|
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)
|
|
30cfd4e3
|
2019-02-13T12:27:21
|
|
appveyor.yml: Fix syntax.
|
|
e43ac60a
|
2019-02-13T12:25:27
|
|
appveyor.yml: CMake 3.13.3 seems to always equire path to project root.
|
|
7ca80c6f
|
2019-02-13T11:26:19
|
|
CHANGELOG.md: Add note about building as shared lib.
|
|
1ea4b3e2
|
2019-02-11T10:10:26
|
|
README.md + CHANGELOG.md: More updates.
|
|
2c1dddc1
|
2019-02-11T09:29:53
|
|
README.md: Minor update.
|
|
5a5f10ef
|
2019-02-10T23:08:54
|
|
CHANGELOG.md: Update for version 0.3.0.
|
|
00a70fea
|
2019-02-10T22:59:49
|
|
Bump version to 0.3.0
|
|
8e01a769
|
2019-02-10T22:58:42
|
|
Implement task lists. (#50)
Fixes #30.
|
|
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.
|
|
b9fcd470
|
2019-02-09T11:01:56
|
|
CHANGELOG.md: Update.
|
|
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.
|
|
f1f2f306
|
2019-02-09T09:40:25
|
|
md_analyze_permissive_url_autolink: Minor cleanup.
|
|
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
|
|
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.
|
|
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
|
|
c340e78b
|
2019-02-06T04:59:26
|
|
md_analyze_inlines: Simplify the code path for table_mode.
|
|
a6cf8ff6
|
2019-02-06T04:36:01
|
|
CHANGELOG.md: Small update.
|
|
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.
|
|
00236fc7
|
2019-02-05T12:59:44
|
|
Update years in the files changed this year and in LICENSE.md.
|
|
03f58685
|
2019-02-05T10:13:34
|
|
md4c.h: Rename and refactorize MD_RENDERER struct.
* Rename MD_RENDERER to MD_PARSER. (Typedef to provide the original
name is provided to minimize disruption of existing code.)
* Reorder its members to make better sense.
* Add abi_version member (hopefully, it shall never be needed ;-)
* Update md2html utility to deal with the change.
Rationale:
This is done in order to prepare for long-term maintenance of ABI
compatibility, as there is no work-in-progress to be buildable as
shared lib, and be included in some Linux distros.
|
|
162b5fe3
|
2019-02-05T10:05:49
|
|
Add CHANGELOG.md.
|
|
a505f696
|
2019-02-03T14:30:06
|
|
md_process_table_row: Enforce that all trable raws have the same count of cells.
The count of columns is derived from the table header underline. If any
other table line (i.e. the header line, or body line) has too few cells,
additional empty cells are generated automatically.
If the line has too many cells, the bogus ones are silently ignored.
This allows consumers to be more simplistic; and it also seems to match
behavior of Github more closely.
|
|
69e914b1
|
2019-02-03T13:29:47
|
|
README.md: Minor wording enhancements.
|
|
da511fa4
|
2019-02-03T00:45:20
|
|
md_is_entity_str(): Fix using bad offset and buffer overflow situation.
Fixes #47.
|
|
7d8f253f
|
2018-11-18T11:24:37
|
|
md_enter_leave_span_a: Fix calling md_free_attribute() on uninitialized data.
(Coverity issue CID 1475544)
|
|
e6a51bd6
|
2018-07-12T03:37:09
|
|
Add "-Wall" to CFLAGS when using Clang as compiler
See also:
* https://cmake.org/cmake/help/v3.12/variable/CMAKE_LANG_COMPILER_ID.html
* https://cmake.org/cmake/help/v3.12/variable/CMAKE_COMPILER_IS_GNUCC.html
|
|
2f79185b
|
2018-06-11T18:40:48
|
|
Bump version to 0.2.7.
|
|
8fc692ba
|
2018-06-11T18:17:26
|
|
md_rollback: Do not touch TABLECELLBOUNDARIES chain.
This chain is not normal opener/closer inline mark chain.
Fixes #42.
|
|
5710bfec
|
2018-06-11T14:13:28
|
|
Fix/simplify handling of end-of-file special mark.
Fixes #43.
|
|
e6e2ea4c
|
2018-06-11T11:43:47
|
|
md_analyze_line: Fix mixing list and table parsing.
If table header underline is not nested the same way as the preceding
line (i.e. the wannabe table header line), then it cannot form a table.
Fixes #41.
|
|
cb7ecd71
|
2018-05-30T00:29:01
|
|
Bump version to 0.2.6.
|
|
4ef024fb
|
2018-05-29T23:30:02
|
|
md_process_inlines: Fix link/image closers spanning over multiple lines.
Fixes #40.
|
|
99a55689
|
2018-05-29T22:42:24
|
|
md_is_inline_link_spec_helper: Link destination is mandatory...
... unless it is omitted also with the title.
|
|
e5feaf2c
|
2018-05-29T19:42:13
|
|
md_is_named_entity_contents: Fix buffer overflow.
Fixes #38.
|
|
469873ee
|
2018-05-29T19:06:39
|
|
md_is_link_label: Prevent read from lines[] beyond its size.
Fixes #37.
|
|
7deaccf6
|
2018-05-29T18:32:10
|
|
md_is_link_label: Fix if the link label contains just backslash escapes.
The function did not remember the label start line index, leading to bad
consequences.
Fixes #39.
|
|
387bd020
|
2018-05-28T23:09:09
|
|
Fix misleading comment.
|
|
00ca0604
|
2018-05-28T22:03:49
|
|
Bump version to 0.2.5
|
|
bf022cb6
|
2018-05-28T21:14:45
|
|
Fix md_split_simple_pairing_mark().
When splitting a mark into two, make sure each of them gets the right
share od dummies for case that we will have to split once more.
Fixes #36.
|
|
e7b84d65
|
2018-05-28T21:09:32
|
|
pathological_tests.py: Fix test compatibility with Windows.
|
|
81e2a5ca
|
2018-04-12T17:03:37
|
|
pathological_tests.py: Test deeply nested lists.
|
|
21d6cc9d
|
2018-04-12T12:03:18
|
|
md2html.c: Fix possible overflow in membuf_grow().
|
|
26c5268e
|
2018-04-12T11:51:21
|
|
md2html.c: Add newline to some error messages.
|
|
fdc1d61e
|
2018-04-11T19:47:11
|
|
In md_is_atxheader_line(), set *p_end on success.
This prevents reiteration over the ATX header prefix in the caller.
|
|
0d1a41a4
|
2018-03-28T08:21:21
|
|
md_build_attr_append_substr: Fix +1 allocation error.
Fixes #33.
|
|
e0002e2b
|
2017-12-27T09:45:34
|
|
md4c.h: Fix some copy&paste errors in comments.
|
|
3cf6637b
|
2017-12-10T16:11:36
|
|
run-tests.sh: Use 'py' utility if available.
|
|
8bb5e2dc
|
2017-09-29T23:42:36
|
|
md4c.h: Fix typo in an #error message.
|
|
c3c1f9b0
|
2017-09-29T23:37:31
|
|
README.md: Minor fix.
|
|
afc779f9
|
2017-09-11T11:07:05
|
|
Avoid initializing strings with literals without '\0' terminator.
It improves maintainability of the code and it should also fix some
MSVC2015 warnings (see #26).
|
|
5f47a5cb
|
2017-09-11T10:55:21
|
|
md_build_attribute: Handle U+0000 character.
|
|
bad11ede
|
2017-08-31T14:49:18
|
|
Fix path in codecov.yml
|
|
44fc7cf2
|
2017-08-30T16:06:44
|
|
Merge branch 'master' of https://github.com/mity/md4c
|
|
7906f4ee
|
2017-08-30T16:05:27
|
|
Add codecov.yml to ignore test dir in coverage reports.
|
|
8bfb6785
|
2017-08-28T16:16:59
|
|
render_html: Get rid of global variable.
This is a residue which by mistake survived the isolation of the
rendering code in the c850843c12468c6bd500b4c1d86653bdac5628d4.
|
|
dc3dde78
|
2017-08-28T16:14:04
|
|
render_html: Add a new line after <ol>.
This makes the behavior more consistent with <ul>.
|
|
19b24bdd
|
2017-08-16T18:15:19
|
|
Simplify the pathological test "many references".
|
|
07cec7dc
|
2017-08-16T16:34:50
|
|
Add regression test for #24.
|
|
2e0a74ba
|
2017-08-16T16:01:45
|
|
Fix problematic link destinations with angle brackets.
Fixes #24.
|
|
9b8058d5
|
2017-08-13T11:47:18
|
|
.travis.yml: Make sure we make a debug build.
This should be more friendly to code coverage analysis.
|
|
a2d8c37b
|
2017-08-13T11:24:24
|
|
README.md: Improve badge labels.
|
|
71aa92db
|
2017-08-13T11:03:47
|
|
.travis.yml: Install python3 for running tests.
|
|
944139e5
|
2017-08-13T10:57:12
|
|
Create code coverage report by lcov.
|
|
4f4bbcaa
|
2017-08-13T10:47:48
|
|
Migrate code coverage reporting from coveralls.io to codecov.io.
|
|
17ad25ee
|
2017-08-03T11:59:25
|
|
CMakeLists.txt: Do not force -O2 in the release build.
With newer gcc (7.1), -O3 and -O2 makes real difference in the resulted
performance. On my Linux machine it makes about 10% when tested
with Cmark's `make bench`.
|