-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
WIP: Adds new RegExp-based "parser" #478
Conversation
3462ac8
to
daa074b
Compare
This is not where we want to end up.
I agree. |
Since we're only delineating the blocks in the "parser" there's no great need to pull in a heavyweight parser. This uses RegExps and a recursive-descent approach to split the blocks. Still yet to do is parse the attributes but that shouldn't take long.
4b00aa5
to
e0aafce
Compare
8ad21e0
to
ee48578
Compare
Related to #413 and current APIs for block transforms, there's an immediate need to be able to transform legacy content, which requires being able to parse content outside block demarcations (currently aggregated into a single freeform block). |
Quoting from Automattic/wp-post-grammar#18 (comment) because it expands a bit more on my previous comment here:
So I think rather than adding another parser here, we should look to expand the existing ones. A couple of options:
|
closing because this was an experiment and not needed |
Since we're only delineating the blocks in the "parser" there's no great
need to pull in a heavyweight parser. This uses RegExps and a
recursive-descent approach to split the blocks.
Still yet to do is parse the attributes but that shouldn't take much effort.
Granted, I think we should pull more parsing of the inside of the blocks
into this file, but if we're leaving all the dirty parsing up to the blocks then
this is sufficient.