-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow parsedown to specify list start attribute #431
Conversation
(I think this should work) Allow parsedown to specify list start attribute (see: erusev#100 (comment))
Looks like I might need to return the pattern which was used previously Reverting last change as build still failed This build will still fail, but I'm hoping it will only fair where the list start value has been inserted
@erusev: Increases CommonMark compliance, see http://spec.commonmark.org/0.26/#start-number (however, I didn't check the suggested code changes) |
Okay, so maybe I should have looked 20 lines or so above where I made the edit in the element function – looks like it already supports adding attributes ;p Have amended the change to blocklist to use the already existing functionality, and have reverted the change that I made to the element function.
I've removed a change I made that added a feature that already exists ;p Checks still look good – still receiving (the expected) single failure |
Can you please update the test? You just have to edit Looks great to me! 👍 |
Okay, this should be good (including tests). |
@erusev Sort of – the dot still needs to be excluded somehow, whether that's by grabbing all the numbers in the capture group, or by chopping off the last character (the dot). |
@erusev in-fact ignore my previous comment – that wouldn't work, since the number needs to be known before inserting it (to check if it is 1) It would actually need to be more like this (with the string splitting to get the dot) |
This looks much better. Could you update the pull request? Thanks. |
Readability improvements
Should fix compatibility for PHP 5.3
@erusev Done – as written in the screenshot, bar the |
|
Performance: Swap preg_replace for stristr to obtain list start
@erusev looks like |
Great, a few more :)
|
Syntax preferences to match surrounding code
Remove github added tabs on blank lines
@erusev Syntax has been adjusted ;-) |
Could you handle 2 more :)
|
Syntax preferences
@erusev Okay, that should be done now? 😜 |
Nice, that's perfect 🎉 |
Yep :) Thanks |
(I think this should work)
Allow parsedown to specify list start attribute (see: #100 (comment))