Aidan Woods
714ae50211
Text variable isn't very useful inside the loop
2019-04-07 16:38:04 +01:00
Aidan Woods
14b3761687
Produce Blocks before converting to StateRenderables
...
(As we do with Inlines)
2019-04-07 16:38:04 +01:00
Aidan Woods
00821bd072
Don't remove right #'s too early (before dealing with whitesapce)
2019-04-07 16:38:03 +01:00
Aidan Woods
b8cdc6e9a5
Remove closing # sequence from header
2019-04-07 16:38:03 +01:00
Aidan Woods
67231cbae1
Tabs are allowed after header delimiter
2019-04-07 16:38:03 +01:00
Aidan Woods
81a2050608
Headers can't start with more than three spaces
2019-04-07 16:38:03 +01:00
Aidan Woods
3d41f270c2
Better name for testing safe mode and strict mode state
...
Add a nice named constructor
2019-04-07 16:38:03 +01:00
Aidan Woods
bb424e606f
Improve indent handling by lists
2019-04-07 16:38:03 +01:00
Aidan Woods
51c3d9d445
Make it clearer this is one backslash character
2019-04-07 16:38:02 +01:00
Aidan Woods
74bba0b2fa
rtrim non hard breaking lines
2019-04-07 16:38:02 +01:00
Aidan Woods
fc37ad11ed
Tabs shouldn't break thematic breaks
2019-04-07 16:38:02 +01:00
Aidan Woods
4e9a0113c3
Thematic breaks can't have an indent of more than 3
2019-04-07 16:38:02 +01:00
Aidan Woods
82c981657d
Require Inlines to provide a best plaintext rendering
...
This allows markdown to be parsed "inside" the alt
attribute of an image, and then the best plaintext
can be used as the rest.
This improves CommonMark compliance.
2019-04-07 16:38:02 +01:00
Aidan Woods
576a2c4519
Generalise line parsing to return Inlines before applying state
2019-04-07 16:38:01 +01:00
Aidan Woods
083ad582c7
State management
...
Decouple state from final rendering
Restore initial state after parsing
2019-04-07 16:38:01 +01:00
Aidan Woods
c9388cb5c2
Make use of line name instead of lineElements
2019-04-07 16:38:01 +01:00
Aidan Woods
bb8a16ad81
Remove useless line method
...
This will be achievable by directly restricting enabled Components
2019-04-07 16:38:01 +01:00
Aidan Woods
7f526c07a0
Indent offset is encompassed in Lines object
2019-04-07 16:38:01 +01:00
Aidan Woods
366600034c
This isn't used and is derivable from the indent
2019-04-07 16:38:01 +01:00
Aidan Woods
6add0ea877
Remove useless variables
2019-04-07 16:38:00 +01:00
Aidan Woods
dac6b01d1a
Remove meaningless interrupt check
...
Interrupted implies previousEmptyLines > 0 in incoming Context
2019-04-07 16:38:00 +01:00
Aidan Woods
6f5780abfd
Improve Link API
2019-04-07 16:38:00 +01:00
Aidan Woods
2757274854
Constant arrays to static vars for PHP 5.5
2019-04-07 16:38:00 +01:00
Aidan Woods
37895448ba
Fix PHP 5.6 bug
2019-04-07 16:38:00 +01:00
Aidan Woods
6f1bc7db14
Fix pre PHP7 closure-as-property closure syntax
2019-04-07 16:38:00 +01:00
Aidan Woods
e4ed4da626
More keyword related fixes for pre PHP 7
2019-04-07 16:38:00 +01:00
Aidan Woods
351a68a14c
Remove some return type hints that I missed
2019-04-07 16:37:59 +01:00
Aidan Woods
a9aa7e7aae
Test on PHP 5.5 and 5.6
...
Issue on pre PHP 7 may be to do with method name and not call syntax as
suspected
2019-04-07 16:37:59 +01:00
Aidan Woods
f8003dcded
Remove debug lines
2019-04-07 16:37:59 +01:00
Aidan Woods
e6e24a8d0d
Rewrite to use new internals
2019-04-07 16:37:58 +01:00
Aidan Woods
36cfb21908
Remove no longer needed parts of core class
2019-04-07 16:37:58 +01:00
Aidan Woods
dbdbda52a8
Make Parsedown non-extendable and remove comment header
2019-04-07 16:37:58 +01:00
Aidan Woods
114eb0bc5b
Add required imports
2019-04-07 16:37:57 +01:00
Aidan Woods
a286033f52
Implement UrlTag
2019-04-07 16:37:57 +01:00
Aidan Woods
53bb9a6467
Implement Url
2019-04-07 16:37:57 +01:00
Aidan Woods
db1d0a4999
Implement Strikethrough
2019-04-07 16:37:57 +01:00
Aidan Woods
f256352f53
Implement SpecialCharacter
2019-04-07 16:37:57 +01:00
Aidan Woods
778eacd081
Implement Markup
2019-04-07 16:37:57 +01:00
Aidan Woods
5e8905c455
Implement Image
2019-04-07 16:37:57 +01:00
Aidan Woods
dad0088adb
Implement Link
2019-04-07 16:37:56 +01:00
Aidan Woods
79a38a1ebb
Implement EscapeSequence
2019-04-07 16:37:56 +01:00
Aidan Woods
164a39f3e9
Implement Emphasis
2019-04-07 16:37:56 +01:00
Aidan Woods
f2a3a2fb08
Implement Email
2019-04-07 16:37:56 +01:00
Aidan Woods
497045d25b
Implement Code
2019-04-07 16:37:56 +01:00
Aidan Woods
760945008b
Implement plaintext
2019-04-07 16:37:56 +01:00
Aidan Woods
25cf5a1729
Add some traits for common Inline implementations
2019-04-07 16:37:55 +01:00
Aidan Woods
18e239fba1
Implement Paragraph
2019-04-07 16:37:55 +01:00
Aidan Woods
b53971e656
Implement Table
2019-04-07 16:37:55 +01:00
Aidan Woods
0c730e0dc5
Implement Reference
2019-04-07 16:37:55 +01:00
Aidan Woods
565c8dd3cc
Implement IndentedCode
2019-04-07 16:37:55 +01:00
Aidan Woods
ee094cb397
Implement Markup
2019-04-07 16:37:55 +01:00
Aidan Woods
edc004f503
Implement SetextHeader
2019-04-07 16:37:55 +01:00
Aidan Woods
af97e99b39
Implement Rule
2019-04-07 16:37:54 +01:00
Aidan Woods
a95bc60c30
Implement List
2019-04-07 16:37:54 +01:00
Aidan Woods
07c2566042
Implement Header
2019-04-07 16:37:54 +01:00
Aidan Woods
57c6350184
Implement FencedCode
2019-04-07 16:37:54 +01:00
Aidan Woods
194c916c6a
Implement Comment
2019-04-07 16:37:54 +01:00
Aidan Woods
c50deda690
Implement BlockQuote
2019-04-07 16:37:54 +01:00
Aidan Woods
3094329950
Add traits to provide common block implementations
2019-04-07 16:37:54 +01:00
Aidan Woods
74a855946d
Add some more exotic type specialisations of block
2019-04-07 16:37:53 +01:00
Aidan Woods
c17868cac8
Basic block and inline definitions
2019-04-07 16:37:53 +01:00
Aidan Woods
5a00cb7f07
Define a basic component
2019-04-07 16:37:53 +01:00
Aidan Woods
db657952d1
Add DefinitionBook configurable to replace definition data
2019-04-07 16:37:53 +01:00
Aidan Woods
c55dbb0d3f
Add safe mode and strict mode configurables
2019-04-07 16:37:53 +01:00
Aidan Woods
072f91df47
Add some useful renderables
2019-04-07 16:37:53 +01:00
Aidan Woods
c852b487b4
Expose text string backing
2019-04-07 16:37:53 +01:00
Aidan Woods
00835c5101
Adjustments to rendering spacing
2019-04-07 16:37:52 +01:00
Aidan Woods
a971e5aa54
Put element related sanitisation and data in a centralised location
2019-04-07 16:37:52 +01:00
Aidan Woods
23cfbd153c
Add canonical state renderable to provide default implementation for
...
renderables to be trivially state renderable
2019-04-07 16:37:52 +01:00
Aidan Woods
23560bfa33
Add handler so closures can implement state renderable via the wrapper
2019-04-07 16:37:52 +01:00
Aidan Woods
1f06b47e6c
Add configurable and state
2019-04-07 16:37:52 +01:00
Aidan Woods
7746c9df06
Add state renderable -- all renderables are state renderables
2019-04-07 16:37:52 +01:00
Aidan Woods
dcc5ea0c9b
Add Excerpt class
2019-04-07 16:37:52 +01:00
Aidan Woods
7ef8b30043
Capitalisation
2019-04-07 16:37:51 +01:00
Aidan Woods
deaf0682b5
Make tab shortage function public
2019-04-07 16:37:51 +01:00
Aidan Woods
1541859e0e
PHP < 7 compat for Html renderables
2019-04-07 16:37:51 +01:00
Aidan Woods
0f6c0fa84d
PHP < 7 compat
...
Don't use token name for function name
Remove return typehint
Remove parameter typehints
2019-04-07 16:37:51 +01:00
Aidan Woods
0f36000dc9
Add typed Context and Lines objects
2019-04-07 16:37:50 +01:00
Aidan Woods
f6a845fa52
Use typed Line object
2019-04-07 16:37:50 +01:00
Aidan Woods
8512e65a18
Standardise formatting
2019-04-07 16:37:49 +01:00
Aidan Woods
267256cbb8
Fix typos
2019-04-07 16:37:48 +01:00
Aidan Woods
f8aa618f3d
Default construct to empty text
2019-04-07 16:37:48 +01:00
Aidan Woods
f85f6cbd40
Add setting constructors for each property
2019-04-07 16:37:48 +01:00
Aidan Woods
822cf15ac9
Add helper constructor with variadic
2019-04-07 16:37:48 +01:00
Aidan Woods
9046f066df
Html/Component -> Html/Renderable
2019-04-07 16:37:48 +01:00
Aidan Woods
7690b98f61
Correct namespace
2019-04-07 16:37:48 +01:00
Aidan Woods
04581d0915
Basic HTML constructs
2019-04-07 16:37:47 +01:00
Aidan Woods
c429c47fee
Remove strict_types
for PHP 5.3 and 5.4 compat
2019-04-07 16:37:47 +01:00
Aidan Woods
88ab68fd0b
Refactor into namespaces for PSR-4
2019-04-07 16:37:47 +01:00