-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add support for blocks in list items. #10
Add support for blocks in list items. #10
Conversation
Is there any reason why not to use |
Not that I know of. I just wasn't aware I could use it. I'll update. |
Well actually, seems I can't use it because of conflicts: Trying this:
And getting this:
|
Okay. Some rearranging is necessary, the nodes in _element have newlines associated already, and lines of text ( What we want here is very similar overall to the body node, basically. Without the standalone directives, which simplifies parsing. Should we just use the
This was too much phone effort. :S What do you think? |
Don't do this to yourself :D Yeah, I think we could easily have a paragraph in there. From my tests, list item can contain anything that a headline body can, so I think that should be the way to go. |
Just wanted to update on why this isn't done yet:
There are at least three ways to resolve this. My first attempt was to rewrite the scanner to start looking at column=0, which complicates things because the The next way to resolve it is change from using 'listitemend' to move newline matching logic that's currently in the external scanner into the grammar, and only scan for indentation changes. This might be the route to settle on, but I'm not excited about it. The next way to resolve it is not add the elements to the list parser at all, and inject an For the short term, it might be simpler to solve why the parser is throwing an error in your example and resolve that, so I can sink into solving this problem when I have a day to invest into it. |
I hoped this issue was fixed with the latest changes, but it seems it's still broken: This:
Gives this:
Is it still complicated to add a support for this? I know previous version caused some issues. |
Unfortunately yes. I think the best solution until I can invest some time on that problem will be to inject an org parser across That said, it really shouldn't be an error, so I'll see if there's a solution to that. |
Should be resolved in |
This PR adds support for src and dynamic blocks in list items. I got a report here about this. I tested on emacs orgmode, and it properly supports these blocks in list items.
I created an anonymous node for this for the sake of DRY, but if you think it needs to be done differently, let me know.I set it up to go only after new line.