|
b42e7f5c
|
2022-01-10T11:41:25
|
|
md_resolve_links: Avoid link ref. def. lookup if...
if we know that the bracket pair contains nested brackets. That makes
the label invalid anyway, therefore we know that there is no link ref.
def. to be found anyway.
In case of heavily nested bracket pairs, the lookup could lead to
quadratic parsing times.
Fixes #172.
|
|
7f44e1ad
|
2022-01-10T10:39:29
|
|
pathological_tests.py: Improve code alignment.
|
|
d0e3ed79
|
2020-03-12T22:45:32
|
|
md2html: Skip UTF-8 BOM, if present in the input.
|
|
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.
|
|
0959975a
|
2019-03-26T14:01:02
|
|
md_analyze_emph: Follow specs changes to the "rule of three".
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
19b24bdd
|
2017-08-16T18:15:19
|
|
Simplify the pathological test "many references".
|
|
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.
|
|
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.
|