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

53 Commits

Author SHA1 Message Date
35d24d0b56 PHP < 7 patch 2019-04-07 16:38:46 +01:00
3f74fe8347 Port fix for https://github.com/erusev/parsedown/issues/699 into new
codebase
2019-04-07 16:38:46 +01:00
3ccd64a9a1 Expand public API of Components
Ref: https://github.com/erusev/parsedown/issues/694
2019-04-07 16:38:19 +01:00
3c0b528d54 Constructor shouldn't be part of public API 2019-04-07 16:38:18 +01:00
2b79d599fb Require State to build and advance blocks 2019-04-07 16:38:15 +01:00
36fac49ed8 Remove redundant checks
These don't appear to have a measurable positive impact on performance.
2019-04-07 16:38:15 +01:00
a681cf631c Acquisition capable blocks as an interface 2019-04-07 16:38:15 +01:00
2efae741bb Simplify expression 2019-04-07 16:38:14 +01:00
660c2e43a3 Paragraph would end itself and new one must start for header row to
exist
2019-04-07 16:38:13 +01:00
d9792bb12c Ensure markers are checked when beginning blocks 2019-04-07 16:38:13 +01:00
08c40afc16 Test against HTML block endings 2019-04-07 16:38:13 +01:00
c310625b93 Length not necessary 2019-04-07 16:38:13 +01:00
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
a2bca78f7e Fix whitespace errors 2019-04-07 16:38:11 +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
82d20d8ffe Markup like CommonMark 2019-04-07 16:38:09 +01:00
aab56cf8cc Fix strange formatting 2019-04-07 16:38:07 +01:00
d6f526d80f Return state after block parse instead of mutating the instance copy 2019-04-07 16:38:06 +01:00
d733c262c2 Cleanup logical operators 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
eb90905d27 Default value is intrinsic to a configurable, we can just always
retrieve that.
2019-04-07 16:38:04 +01:00
00821bd072 Don't remove right #'s too early (before dealing with whitesapce) 2019-04-07 16:38:03 +01:00
b8cdc6e9a5 Remove closing # sequence from header 2019-04-07 16:38:03 +01:00
67231cbae1 Tabs are allowed after header delimiter 2019-04-07 16:38:03 +01:00
81a2050608 Headers can't start with more than three spaces 2019-04-07 16:38:03 +01:00
3d41f270c2 Better name for testing safe mode and strict mode state
Add a nice named constructor
2019-04-07 16:38:03 +01:00
bb424e606f Improve indent handling by lists 2019-04-07 16:38:03 +01:00
fc37ad11ed Tabs shouldn't break thematic breaks 2019-04-07 16:38:02 +01:00
4e9a0113c3 Thematic breaks can't have an indent of more than 3 2019-04-07 16:38:02 +01:00
c9388cb5c2 Make use of line name instead of lineElements 2019-04-07 16:38:01 +01:00
6add0ea877 Remove useless variables 2019-04-07 16:38:00 +01:00
dac6b01d1a Remove meaningless interrupt check
Interrupted implies previousEmptyLines > 0 in incoming Context
2019-04-07 16:38:00 +01:00
2757274854 Constant arrays to static vars for PHP 5.5 2019-04-07 16:38:00 +01:00
e4ed4da626 More keyword related fixes for pre PHP 7 2019-04-07 16:38:00 +01:00
f8003dcded Remove debug lines 2019-04-07 16:37:59 +01:00
18e239fba1 Implement Paragraph 2019-04-07 16:37:55 +01:00
b53971e656 Implement Table 2019-04-07 16:37:55 +01:00
0c730e0dc5 Implement Reference 2019-04-07 16:37:55 +01:00
565c8dd3cc Implement IndentedCode 2019-04-07 16:37:55 +01:00
ee094cb397 Implement Markup 2019-04-07 16:37:55 +01:00
edc004f503 Implement SetextHeader 2019-04-07 16:37:55 +01:00
af97e99b39 Implement Rule 2019-04-07 16:37:54 +01:00
a95bc60c30 Implement List 2019-04-07 16:37:54 +01:00
07c2566042 Implement Header 2019-04-07 16:37:54 +01:00
57c6350184 Implement FencedCode 2019-04-07 16:37:54 +01:00