Commit Graph

447 Commits

Author SHA1 Message Date
Aidan Woods 3825db53a2 Merge branch '1.8.x-beta' 2019-04-06 17:58:29 +01:00
Aidan Woods fe7a50eceb
New release due to mislabeled previous tag 2019-03-17 18:47:21 +00:00
Aidan Woods 7d4c06cb52
Bump version 2019-03-17 17:19:07 +00:00
Aidan Woods 8fd5464c46
[1.8.x-beta] Fix spaces in class names 2019-03-17 17:01:52 +00:00
Aidan Woods 2bd7113c55
Merge pull request #676 from aidantwoods/fix/uninitialized-string-offset
Fix access to potentially uninitialised offset
2018-11-06 21:49:46 +00:00
Aidan Woods 29fce0ec37
Fix access to potentially uninitialised offset 2018-11-06 21:10:23 +00:00
Aidan Woods 72f9ca92ae
Merge pull request #671 from aidantwoods/fix/line-ending-standardisation
Ensure line-breaks get standardised when using Parsedown via `line` method
2018-10-16 18:51:05 +01:00
Aidan Woods 89c3fa05d9
Ensure line-breaks get standardised when using via `line` method
As noted in https://github.com/erusev/parsedown/pull/624 there are
occasions where line break standardisation is assumed (e.g. where
`inlineCode` replaces line breaks with a space).

Closes #624
2018-10-16 18:41:42 +01:00
Till Krüss 3a0c964291
Add "tel:" to whitelist 2018-10-02 16:38:21 -07:00
horodev 464f5f9329 removed min function as it is redundant in the context 2018-09-19 17:36:40 +02:00
Aidan Woods c26a2ee4bf
Bump beta version 2018-06-11 19:15:32 +01:00
Aidan Woods 0b1e6b8c86
Restore existence of protected API methods 2018-06-07 19:47:09 +01:00
Aidan Woods 1f69f7e697
Bump version 2018-05-08 22:46:15 +01:00
Aidan Woods 4686daf8c2
Preserve plain-text in AST to avoid blinding extensions to it 2018-05-08 22:32:57 +01:00
Aidan Woods 9eed1104e7
Intepret special "hidden" key as an empty element 2018-05-08 21:54:30 +01:00
Aidan Woods fd95703da5
Version bump 2018-05-07 14:26:12 +01:00
Aidan Woods 8d172a2994
Merge pull request #614 from aidantwoods/enhancement/performance-tweaks
General and performance tweaks
2018-05-07 11:18:21 +01:00
Attila Vachter 113c6d2b21 Tilde characters may be escaped 2018-04-23 15:09:30 +02:00
Aidan Woods a9764ec90f
Remove complex string interpolation expressions 2018-04-14 15:27:06 +01:00
Aidan Woods 7f4318dbdb
PHP 5.3 == 💩 2018-04-12 22:22:53 +01:00
Aidan Woods 3e70819a20
Readability improvements, thanks @PhrozenByte 2018-04-12 22:16:25 +01:00
Aidan Woods 2bf7ca41a0
Add compat for extensions using old `markup` key. 2018-04-12 21:25:50 +01:00
Aidan Woods b75fd409ff
Must unset text key so that our destination is preferred as content 2018-04-12 21:10:09 +01:00
Aidan Woods 88a3f31dd7
Rewrite as one statement 2018-04-12 19:33:01 +01:00
Aidan Woods 726d4ef44a
Sanity checks before starting regex engine 2018-04-09 18:09:45 +01:00
Aidan Woods 450a74fedf
More expensive statement last 2018-04-09 18:09:45 +01:00
Aidan Woods 7e15d99d90
Remove regex from block rule 2018-04-09 18:09:44 +01:00
Aidan Woods d2dd736e1b
Remove regex from fenced code block
Also remove unused function
2018-04-09 18:09:44 +01:00
Aidan Woods e74a5bd7ed
In theory PHP stores the length of strings, so looking this up should be quick 2018-04-09 18:09:44 +01:00
Aidan Woods b53aa74a72
Use standard library function 2018-04-09 18:09:44 +01:00
Aidan Woods 3ea08140b6
Remove use of array 2018-04-09 18:09:44 +01:00
Aidan Woods c45e41950f
Use standard library over while loop 2018-04-09 18:09:44 +01:00
Aidan Woods 2faba6fef5
Remove unneeded complete function 2018-04-09 18:09:44 +01:00
Aidan Woods b42add3762
Make some regexes possesive 2018-04-09 18:09:43 +01:00
Aidan Woods 107223d3a0
Avoid recomputation 2018-04-09 18:09:43 +01:00
Aidan Woods d4f1ac465c
String interpolation is slightly faster than concat 2018-04-09 18:09:43 +01:00
Aidan Woods d6e306d620
Optimise commonly used regexes to fail fast 2018-04-09 18:09:04 +01:00
Aidan Woods dc5cf8770b
The AST has high complexity here (and so traversal is hard anyway)
We gain quite a bit of a speed boost by working with text here
since this is a very common function
2018-04-09 18:09:04 +01:00
Aidan Woods 70f5c02d47
Use non-nestable values as keys for O(1) lookup 2018-04-09 18:09:04 +01:00
Aidan Woods 90ad738933
General readability 2018-04-09 18:09:04 +01:00
Aidan Woods f2327023c1
No need to unset if not set 2018-04-09 18:09:04 +01:00
Aidan Woods 6f13f97674
Use mutating loop instead of array_map 2018-04-09 18:08:58 +01:00
Aidan Woods cb33daf0e6
Assert table header does not contain new lines 2018-04-09 16:38:03 +01:00
Aidan Woods 043c55e4c6
Give paragraph block semantics for overloading 2018-04-09 15:12:17 +01:00
Aidan Woods e4cd13350b
Remove setLiteralBreaks 2018-04-09 15:11:45 +01:00
Aidan Woods ae8067e862
Swap undefined type for type === 'Paragraph' for ease of reading
The way in which we use this assumes that it is a paragraph, for example
appending text into the handler argument — so there is no loss of
generality here, we're simply being explicit.
2018-04-09 14:48:48 +01:00
Aidan Woods 5353ebb524
Avoid needing two arrays
We only need to collect elements, we can discard finished blocks
2018-04-09 14:48:39 +01:00
Aidan Woods 39df7d4f8e
Swap 'hidden' blocks for empty elements 2018-04-09 14:46:24 +01:00
Aidan Woods 3f5b0ee781
Count number of interrupts 2018-04-09 14:13:10 +01:00
Aidan Woods 43d25a74fe
Fix function name 2018-04-08 18:40:50 +01:00