Repository navigation
Best practice for parsing multiline statements? #663
|
I have created https://github.com/webuni/commonmark-table-extension extension, but I'm not satisfied with it's implementation. The whole parsing logic is in the method Table::finalize. The greatest pain is replacement of the previous element in the method TableParser::parse. Is there any better way to parse complex and multiline structures? |
Answered by
colinodell
Jun 19, 2015
Replies: 2 comments
|
You could try looking at how the Perhaps you can use a similar approach for tables? |
0 replies
Answer selected by
colinodell
|
I'm closing this due to inactivity. We can certainly reopen it if needed though. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could try looking at how the
ListParserworks. It works by identifying lines which are list items. If the current container isn't aListBlock, it'll create that on-the-fly and add the item to it.Perhaps you can use a similar approach for tables?