-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Implement document processor #210
Implement document processor #210
Conversation
2daf332
to
a7464dc
Compare
@colinodell If you want to convert the Other extensions probably expect Strong and Italic to be processed before starting. But if you create an extension named 'awesome-paragraphs', these processors would run before the Commonmark ones. |
@marijnvdwerf Thank you for taking the lead on this. I apologize for the delay in reviewing this, but overall this is exactly what I've been hoping for :)
That makes sense to me, and I'm strongly in favor of that change. It seems to be a simple yet effective solution to this problem. (Otherwise you'd need to have extensions declare their dependencies, determine the proper order, check for circular references, and a bunch of other crazy things. I'd rather use the simple solution first and avoid unnecessary complexity.) I'm not sure I like having the |
3dc096b
to
320a361
Compare
Rebased and implemented the order-based loading. Also fixed the MiscExtension being loaded last. Some issues though:
|
Hey Marijn, I'm very pleased with how these changes look! Nicely done! I especially like how you've modified the
Thanks for the heads up! I have fixed this in
To be completely honest, I wasn't exactly sure what I wanted either :P Let's hold off on modifying
Yeah, I'm fine with reorganizing the order of those methods, especially if the new order makes more sense. The only thing missing is that one test case marked TODO - otherwise these changes look perfect! I'd also like to move the |
320a361
to
12948f6
Compare
|
Surely you should just squash the commits so it was never added? |
7f3ecf3
to
d86f40a
Compare
@GrahamCampbell Done. |
Implement document processor
Thank you so much @marijnvdwerf for implementing these enhancements! All of them will be included in the next version which I hope to release soon (if not today then sometime this week). |
I've added some documentation for this feature: http://commonmark.thephpleague.com/customization/abstract-syntax-tree/#document-processor |
|
First attempt at a document processor. I've added a basic extension which converts Twitter links to embedded tweets.
(Still WIP)
Fixes #207