1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00
Commit Graph

151 Commits

Author SHA1 Message Date
Aidan Woods
79effc4ae2 Ignore invalid docblock in tests 2021-12-08 20:35:46 +00:00
Aidan Woods
638079a3da Slightly nicer method name
Normally this name might be too vague for an interface, but implementing
this interface is a fairly special use case. We can expect dedicated
types here (so method name unlikely to be an issue).
2021-10-15 23:20:20 +01:00
Aidan Woods
421a2393d0 StateBearer must be constructable from State 2021-10-15 23:18:08 +01:00
Aidan Woods
4af22ec41a Allow substitution of blocks and inlines 2021-10-15 19:25:47 +01:00
Aidan Woods
a9f41548d3 adding method for Container 2021-10-13 19:02:52 +01:00
Aidan Woods
71d9263664 Pass State to render stack closure 2021-10-13 18:50:04 +01:00
Aidan Woods
2ea4bece92 Return statebearer instead of state 2021-10-12 18:12:00 +01:00
Aidan Woods
0f27f2e842 Add initState to tests 2021-10-12 18:04:36 +01:00
Aidan Woods
c773305bc1 Add RenderStack
This is a special configurable that can be used to alter the
Renderable[] AST before output.
2021-10-12 00:06:51 +01:00
Aidan Woods
7d1b9ca562 Better autolinks
This doesn't follow gfm spec yet, work lifted from my code over
at
8505e2737e/src/Parsers/GitHubFlavor/Inlines/AutoLink.php

Fixes #505
Fixes #717
2021-10-11 20:09:57 +01:00
Aidan Woods
ca16d7573d Fix psalm errors 2021-10-11 19:23:44 +01:00
Aidan Woods
8764512c23 Add SlugRegister so IDs are not duplicated 2020-05-10 14:32:01 +01:00
Aidan Woods
e332b4710a Add HeaderSlug configurable
Adds HeaderSlug configurable, with the option for the slug function
to be customised.

Co-authored-by: netniV <netniv@hotmail.com>
2020-05-10 14:31:55 +01:00
Aidan Woods
a72455c78a Use ->toHtml over ->text 2020-01-19 15:26:48 +00:00
Aidan Woods
37f306c3a8 Utilise constant arrays over static vars 2019-07-25 00:45:53 +02:00
Aidan Woods
b9bc0b7d37 Update expect-to-pass cache 2019-07-25 00:27:05 +02:00
Aidan Woods
f4fb5bd943 Add type 7 HTML block tests 2019-07-25 00:20:59 +02:00
Aidan Woods
91b8bda46e Update test cache 2019-06-16 21:36:11 +01:00
Aidan Woods
298b319d96 Fix malformed return type 2019-06-16 21:33:55 +01:00
Aidan Woods
efcccb3256 Update commonmark cache 2019-04-10 07:02:52 +01:00
Aidan Woods
9eb6a02334 Limit recursion depth by configurable
Fixes https://github.com/erusev/parsedown/issues/681
2019-04-07 17:34:40 +01:00
Aidan Woods
b9b75dbcea Update commonmark cache 2019-04-07 16:38:46 +01:00
Aidan Woods
3f74fe8347 Port fix for https://github.com/erusev/parsedown/issues/699 into new
codebase
2019-04-07 16:38:46 +01:00
Aidan Woods
9b9c9d83d2 Update CommonMark expect to pass 2019-04-07 16:38:46 +01:00
Aidan Woods
d32f5de2fe According to GFM spec these shouldn't infact be recognised 2019-04-07 16:38:45 +01:00
Aidan Woods
33522f0aa4 Normalise link reference lookups
Ref: https://github.com/erusev/parsedown/pull/104
2019-04-07 16:38:19 +01:00
Aidan Woods
7f6127f3f8 Ensure we cover all mutations in tests 2019-04-07 16:38:19 +01:00
Aidan Woods
3ccd64a9a1 Expand public API of Components
Ref: https://github.com/erusev/parsedown/issues/694
2019-04-07 16:38:19 +01:00
Aidan Woods
747abe7600 Test indented code boundary when list advances 2019-04-07 16:38:18 +01:00
Aidan Woods
93e68056a8 Further improve tests 2019-04-07 16:38:18 +01:00
Aidan Woods
4fb6ac31a5 Improve tests 2019-04-07 16:38:18 +01:00
Aidan Woods
d8d483bd6a Add some component level tests 2019-04-07 16:38:17 +01:00
Aidan Woods
658129d847 Suppress instead of writing super verbose tests 2019-04-07 16:38:17 +01:00
Aidan Woods
dbe37bcb0e Type check tests 2019-04-07 16:38:16 +01:00
Aidan Woods
6ac6b7f7f7 Test blockquote whitespace handling 2019-04-07 16:38:14 +01:00
Aidan Woods
c2973100e0 Fix whitespace trimming for soft and hard breaks 2019-04-07 16:38:14 +01:00
Aidan Woods
0626a83289 Test trimming doesn't occur when asymmetric 2019-04-07 16:38:14 +01:00
Aidan Woods
93650fb9b5 PHP 5.5 compat 2019-04-07 16:38:14 +01:00
Aidan Woods
9bf91d7183 Cache spec locally for 5 minutes 2019-04-07 16:38:13 +01:00
Aidan Woods
08c40afc16 Test against HTML block endings 2019-04-07 16:38:13 +01:00
Aidan Woods
14f8ff52e1 Test continuation of indented code blocks 2019-04-07 16:38:13 +01:00
Aidan Woods
54f2c4eb4c Fix recovered spaces calculation 2019-04-07 16:38:12 +01:00
Aidan Woods
f2f7433dcf Switch to CommonMarkStrict tests 2019-04-07 16:38:11 +01:00
Aidan Woods
a2bca78f7e Fix whitespace errors 2019-04-07 16:38:11 +01:00
Aidan Woods
42d21a2413 Remove cached items no that longer exist in spec.txt 2019-04-07 16:38:10 +01:00
Aidan Woods
f47ba7aa34 Track whitespace left on blank lines to match CommonMark
Test changes copy pasted to match CommonMark reference parser
2019-04-07 16:38:10 +01:00
Aidan Woods
49dd8b113d Make sure closing sequence is removed correctly 2019-04-07 16:38:10 +01:00
Aidan Woods
30763a0f38 HTML tags should have a name 2019-04-07 16:38:10 +01:00
Aidan Woods
3dd1326ded Trim paragraph contents 2019-04-07 16:38:10 +01:00
Aidan Woods
0f55cd5b26 Permit empty links 2019-04-07 16:38:10 +01:00