|
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`.
|
|
3571c2f0
|
2017-08-02T00:41:14
|
|
Bump version to 0.2.3.
|
|
70925cac
|
2017-08-02T00:40:27
|
|
README.md: Upgrade CommonMark version to 0.28.
|
|
25228d5d
|
2017-01-08T09:25:10
|
|
md_is_link_destination_B: Apply new spec rules for parenthesis.
The specification now allows nesting parenthesis inside a link destination
as long as opening and closing ones are balanced.
|
|
a847f552
|
2017-01-08T09:14:49
|
|
md_process_inlines: Apply new spec rules for emph/strong emph.
The spec now states that for
***foo***
we have to genarate
<em><strong>foo</strong></em>
instead of
<strong><em>foo</em></strong>
|
|
ee3bee1a
|
2017-08-02T00:37:18
|
|
Upgrade to CommonMark specification 0.28.
|
|
938460d5
|
2017-07-24T21:17:53
|
|
Improve/unify output of test scripts.
|
|
c52a50a3
|
2017-07-24T21:07:09
|
|
pathological_tests.py: Add test for reference definition lookup.
|
|
f0103c16
|
2017-07-25T00:26:43
|
|
MD_MARK structure: Do not limit prev/next members to 24 bits.
For normal kind of input, using full 32 bits makes no big difference.
And limiting those members to 24 bits was maybe a security issue.
That implied a limit of 2 ** 24 == 16,777,216 marks per a single block.
As big as it may seem, malicious input may contain more. And if the
input is carefully crafted, the mark chains could theoretically form a
circles due to some overflows in these members, which could maybe make
the parser to never finish.
|
|
591b2d21
|
2017-07-25T00:08:51
|
|
md_analyze_marks: Make the function inline.
|
|
61d38ef4
|
2017-07-24T23:59:23
|
|
md_analyze_marks: Remove unneeded parameters.
|
|
c51fb310
|
2017-07-24T23:14:05
|
|
md_analyze_marks: Walk only required range of the marks.
This changes causes that when recursing to analysis of link contents,
only the marks between the link opener and closer are iterated in
md_analyze_marks().
Fixes #22
|
|
a27aefde
|
2017-07-24T20:17:50
|
|
pathological_tests.py: Allow short option -p as a synonym of --program.
|
|
f4f7b223
|
2017-07-24T20:15:09
|
|
pathological_tests.py: Allow Windowish line ends.
|
|
26f14899
|
2017-07-24T19:27:27
|
|
Add pathological_tests.py from cmark.
|
|
ad4f28bb
|
2017-07-24T20:09:23
|
|
md_analyze_simple_pairing_mark: Fix the "rule of three".
If the first emphasis opener is refused due the rule of three, a previous
opener is examined. However the variable opener_orig_size_module3 was not
(re)set accordingly.
Fixes #21.
|
|
e351a1d5
|
2017-07-24T19:42:57
|
|
md_collect_marks: Minor refactorization of emhasis handler.
|
|
70d73941
|
2017-07-22T00:56:23
|
|
md_build_attribute: Propagate NULL string if attribute is empty.
|
|
ca098547
|
2017-07-20T15:54:00
|
|
Avoid heap allocations when building trivial MD_ATTRIBUTE.
|
|
a638a422
|
2017-07-18T19:04:08
|
|
md_build_ref_def_hashtable: Fix variable conflict.
By copy&paste error, we have used two nested loops to use the same
iterator.
|
|
6bc0b861
|
2017-07-18T18:50:07
|
|
Merge branch 'hash'
|
|
cfbce759
|
2017-07-18T18:01:02
|
|
Rework ref. def. dictionary.
It now uses FNV1a and we now sort/bsearch only contents of single bucket.
Additionally we fix #20 by disabling the invalid ref. definitions during
hashtable build.
|
|
ff524e91
|
2017-07-17T08:50:04
|
|
Refactor: Isolate dictionary of reference defintions.
|
|
07c5dba9
|
2017-07-18T18:02:00
|
|
Remove unused structure member.
|
|
4e831dc1
|
2017-07-15T18:40:38
|
|
Add 2017 into copyright notes.
|
|
f2821cbd
|
2017-07-14T17:10:45
|
|
md_analyze_permissive_email_autolink: Make it compatible with CMark-gfm.
|
|
a83db2b7
|
2017-07-14T16:49:42
|
|
README.md: Minor update.
|
|
1bc7f3a8
|
2017-07-14T02:22:15
|
|
render_url_escaped: Fix escaping of ampersand.
This affected generating href attribute if links or src attribute of
images.
|
|
f3f9404e
|
2017-07-14T02:06:23
|
|
Improve URL autolinks extension.
It is now much more compatible to Cmark-gfm.
With the flag MD_FLAG_PERMISSIVEWWWAUTOLINKS, we now also support the
WWW autolinks (when the http: scheme is omitted).
|
|
8818ff14
|
2017-07-13T19:18:03
|
|
Get rid of unneeded MD_LINK_REF_DEF::index.
|
|
302cd5f8
|
2017-07-13T18:54:34
|
|
Improve lookup of link reference definitions.
At the cost of remembering all reference definitions (even when having
same label), we improved the lookup from O(n) to O(log(n)).
This also fixes potential DOS attack by providing input with thousandslink
reference definitions and references to them.
|
|
82c0eb53
|
2017-07-13T16:23:45
|
|
entity_lookup: Make it return UTF-32 codepoints.
And adapted callers accordingly.
Fixes #12.
|
|
25a156ee
|
2017-07-12T23:30:14
|
|
Implement strikethrough extension.
|
|
d84dcec8
|
2017-07-12T22:53:54
|
|
md4c/md4c.h: MD_DIALECT_GITHUB does not imply MD_FLAG_PERMISSIVEATXHEADERS.
Since migration to Cmark-gfm, github.com does not accept them anymore.
|
|
aa51e86f
|
2017-07-12T22:52:58
|
|
md2html/md2html.c: Add options for Markdown dialect.
Added support for options --commonmark and --github.
|
|
71d74e9f
|
2017-05-04T16:33:56
|
|
Merge branch 'master' of https://github.com/mity/md4c
|
|
921602b3
|
2017-05-04T16:21:34
|
|
md_is_link_reference_definition: Do not store multiple link definitions with same label.
|
|
19980907
|
2017-03-19T22:19:28
|
|
use typedef structs that are compatible with both c and c++
|
|
aeaff18e
|
2017-01-04T16:41:46
|
|
Bump version to 0.2.2
|
|
ea83b7f6
|
2017-01-04T21:57:49
|
|
md_analyze_simple_pairing_mark: Fix gcc warning.
|
|
8999e184
|
2017-01-04T14:40:44
|
|
Fix "rule of three" for emphasis resolution (issue #14).
|
|
c63909df
|
2017-01-04T15:04:09
|
|
When splitting emphasis opener mark, we have to retain 'dummy' marks available for more splitting in the future (issue #15).
|
|
3c28a8b8
|
2017-01-04T14:29:50
|
|
md_rollback: Do not play with the mark flag MD_MARK_LEAF.
And remove the flag altogether.
|
|
3688e0fc
|
2017-01-01T23:52:27
|
|
md_link_label_eq: Remove harmful anti-optimization.
|
|
ca5da63d
|
2017-01-01T22:02:33
|
|
md_collect_marks: Optimize in case of 8-bit encodings by eliminating some branches in the fast path.
|
|
443ee515
|
2017-01-01T21:39:48
|
|
md_collect_marks: Optimize the fast path by making its loops tighter.
|
|
7cb7f65c
|
2017-01-01T18:20:25
|
|
md_collect_marks: Optimize fast path by some manual loop unrolling.
|
|
2726b7cb
|
2017-01-01T17:40:02
|
|
Minor code cleanup.
|
|
9c644b40
|
2017-01-01T17:26:36
|
|
md_analyze_line: Optimize scanning for end of line.
|
|
f1a63f1c
|
2017-01-01T16:18:42
|
|
md_process_table_row: Fix possible errorneous free() on an error path.
|
|
1a8ce93d
|
2016-12-28T00:02:23
|
|
Add macros MD_DIALECT_COMMONMARK and MD_DIALECT_GITHUB.
|
|
52712384
|
2016-12-27T22:47:03
|
|
When parsing tables, pipes inside a link/image/code span cannot make cell boundary (issue #7).
|
|
72173b3f
|
2016-12-21T19:17:07
|
|
Propagate to renderer more info about lists (issue #13).
Make MD_BLOCK_OL_DETAIL and MD_BLOCK_UL_DETAIL (new structure) expose more
info about the lists.
In particular flag whether the list is tight or loose, and info about the
fundamental chartacter making the list item marks.
|
|
a9582fa4
|
2016-12-16T11:23:34
|
|
.travis.yml: Add md2html to coveralls upload.
|
|
ba686ec3
|
2016-12-16T10:16:17
|
|
render_html.c: Fix build with MSVC.
|