54f2c4eb4c
Fix recovered spaces calculation
2019-04-07 16:38:12 +01:00
117912c373
Substr over indexing string
2019-04-07 16:38:12 +01:00
63a97a926b
Remove leftover hackyness
2019-04-07 16:38:12 +01:00
cb211a88a8
PHP < 7 compat
2019-04-07 16:38:12 +01:00
c49d40027f
Add StateBearer which can carry state
2019-04-07 16:38:11 +01:00
4dee1e9a55
Add convenience instance-based initialisers
2019-04-07 16:38:11 +01:00
dbc0efeec0
Require integer-keyed lists so that array_merge result is predictable
2019-04-07 16:38:11 +01:00
fe1355ef9e
Test strict and weak in Travis
2019-04-07 16:38:11 +01:00
f2f7433dcf
Switch to CommonMarkStrict tests
2019-04-07 16:38:11 +01:00
a2bca78f7e
Fix whitespace errors
2019-04-07 16:38:11 +01:00
42d21a2413
Remove cached items no that longer exist in spec.txt
2019-04-07 16:38:10 +01:00
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
49dd8b113d
Make sure closing sequence is removed correctly
2019-04-07 16:38:10 +01:00
30763a0f38
HTML tags should have a name
2019-04-07 16:38:10 +01:00
3dd1326ded
Trim paragraph contents
2019-04-07 16:38:10 +01:00
0f55cd5b26
Permit empty links
2019-04-07 16:38:10 +01:00
5ada761532
Cache new passing tests
2019-04-07 16:38:10 +01:00
4fa89c1a80
Fix regex compilation
2019-04-07 16:38:09 +01:00
7b72eb6454
As best I can tell, these were passed accidently before
2019-04-07 16:38:09 +01:00
745db11d2f
Since SafeMode concerns output, spacing should still be parsed like markup
2019-04-07 16:38:09 +01:00
82d20d8ffe
Markup like CommonMark
2019-04-07 16:38:09 +01:00
7fd6e0bb31
Backslash escape like CommonMark
2019-04-07 16:38:09 +01:00
eab734b457
Match CommonMark's rendering a bit better
2019-04-07 16:38:08 +01:00
2e0ad27c5e
CommonMark escapes double-quotes
2019-04-07 16:38:08 +01:00
d6c97ee111
Make escaping slightly less aggressive
2019-04-07 16:38:08 +01:00
62615f4fc5
Allow empty code spans
2019-04-07 16:38:08 +01:00
50e135cd4e
Update expect-to-pass CommonMark spec examples for f4e0234
2019-04-07 16:38:08 +01:00
0514997103
Add initial test/commonmark/ folder
2019-04-07 16:38:08 +01:00
4c0734d935
Sync phpunit data set and CommonMark spec example numbers
2019-04-07 16:38:07 +01:00
734b4fc3d7
Test Parsedown against cached expect-to-pass CommonMark spec examples
...
This test suite runs tests the same way as `test/CommonMarkTestWeak.php`, but uses a cached set of CommonMark spec examples in `test/commonmark/`. It is executed along with Parsedown's default test suite and runs various CommonMark spec examples, which are expected to pass. If they don't pass, the Parsedown build fails. The intention of this test suite is to make sure, that previously passed CommonMark spec examples don't fail due to unwanted side-effects of code changes.
You can re-create the `test/commonmark/` directory by executing the PHPUnit group `update`. The test suite will then run `test/CommonMarkTestWeak.php` and create files with the Markdown source and the resulting HTML markup of all passed tests. The command to execute looks like the following:
$ phpunit --group update
2019-04-07 16:38:07 +01:00
4563ee592d
Don't assume marker type is correct
2019-04-07 16:38:07 +01:00
cbe7b25b21
No markup can be achieved by removing the respective parsing Components
2019-04-07 16:38:07 +01:00
f0da746c7b
Remove reminder comment
...
urlsLinked(false) is replaced by customising to remove
the inline from InlineTypes configurable when initialising
Parsedown
2019-04-07 16:38:07 +01:00
aab56cf8cc
Fix strange formatting
2019-04-07 16:38:07 +01:00
48c0c34470
Caching for initial configurable values removes need to seed state
2019-04-07 16:38:07 +01:00
bc3c1544c5
Don't special case invisible
...
If something has no html, it doesn't need to have a newline
2019-04-07 16:38:06 +01:00
d6f526d80f
Return state after block parse instead of mutating the instance copy
2019-04-07 16:38:06 +01:00
b728f254b7
Ensure Url parsing is removed all the way down (not just edge)
2019-04-07 16:38:06 +01:00
ebde35cf0d
Add some style cleanup rules already followed
2019-04-07 16:38:06 +01:00
d733c262c2
Cleanup logical operators
2019-04-07 16:38:06 +01:00
19e21f2d1b
Remove test extensions
2019-04-07 16:38:06 +01:00
11da347aa1
We don't need to pass a Parsedown instance down
...
Since Parsedown is instancible from State, we only
need to carry that down.
2019-04-07 16:38:05 +01:00
b89bd0e3c2
Add breaks configurable
2019-04-07 16:38:05 +01:00
fce09a702a
Put reused code in a trait so boolean configurables are easy to make
2019-04-07 16:38:05 +01:00
8fe93f30ac
Add easy way to remove Components from InlineTyes and BlockTypes
2019-04-07 16:38:05 +01:00
9f9ef78662
This should be slightly faster
...
Merge would honour changes, and removals
are equivalent to changing to default value.
2019-04-07 16:38:05 +01:00
57632f38fb
More meaningful method name
2019-04-07 16:38:05 +01:00
5e7fb61879
More keyword fixes for pre-PHP7
2019-04-07 16:38:05 +01:00
2618509cc6
Now the class is a bit shorter we can remove these makeshift dividers
2019-04-07 16:38:04 +01:00
fce4633ff9
Inlines and Blocks as Configurables
2019-04-07 16:38:04 +01:00