-
Notifications
You must be signed in to change notification settings - Fork 13
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
codeblock adjacent to list item is not recognized #118
Comments
Looks like Vim's help syntax "supports" this (but it has no concept of list-items, which is a major feature of The general idea in Note that this does work (in both Vim-syntax and tree-sitter-vimdoc):
|
I would expect that codeblock formatting would take precedence over list items, yes. Mostly because it is supported in Vim's
Yes, this is a better solution as it allows to add only single blank line at the top of code block (similar to the one in the initial comment). I thought I tried it before and it did not work. Apparently, missed something. This feels like a decent workaround, though. Now the original example only looks like inconsistency and not like a big issue. |
Related:
(note the inline list item) that is not recognized as codeblock. I seriously think that we need to significantly tighten up the spec, write the parser for that and only that, and fix the bundled help files once and for all (and make clear to plugins that if they want to have proper rendering in Neovim, they have to follow suit). |
meaning that the sample you gave would not be supported? what would the acceptable forms look like? |
We tend to put such descriptions in comments in the codeblock itself. We could also rewrite this as a proper list or table (which seems more reasonable):
(I don't see the point of using a codeblock here.) |
Example:
This seems to be a known problem, but there is no issue to track it and for users to consult with.
I tried to fix this, but the assumption that code block is not contiguous to list item seems to be too much entangled in the grammar itself. So looks like it would at least require serious refactor if at all possible.
The current workaround is to have a blank link after list item text block (contiguous lines without blank lines with first starting with list prefix). So this will work:
The text was updated successfully, but these errors were encountered: