-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Multiline lists don't highlight correctly. #81
Comments
And now you know the reason code blocks aren't highlighted by default. |
Heh, I see--I have this in my vimfiles: " Setup some extra highlighting for code blocks. This matches the
" highlighting from Ben William's syntax/mkd.vim and is a decent fallback
" when we don't support the embedded language or the block is inline.
highlight default link markdownCode String
highlight default link markdownCodeBlock String So that's where the highlighting comes from. But it'd still be nice to have it work correctly. I guess I need to consider disabling the highlighting for now. |
I'm having the same problem, and it's really annoying me because I do a lot of meeting minutes in markdown where a substantial part of the document may be list continuation lines indended more than four spaces. I figured out how to disable highlighting of code blocks ( |
Prior to this commit, _any_ line that started with at least 4 spaces or a tab would be considered a code block. For example, the third level of a 2-space-indented list would be highlighted as code, not as list items. Note: this conforms to the original Markdown spec: > To produce a code block in Markdown, simply indent every line of the > block by at least 4 spaces or 1 tab. > A code block continues until it reaches a line that is not indented > (or the end of the article). While this doesn't explicitly state that a blank line _before_ the code block is required, in practical testing, it is. As such, I've included the requirement of a blank line preceeding the indent to match the region start. Any line not indented by at least 4 spaces will end the region. Closes tpope#81 Closes tpope#164 Closes tpope#94 (possibly) Closes tpope#140
This reverts commit 108b555. Highlighting code blocks shows that multi-line list items aren't parsed correctly: tpope/vim-markdown#81
Prior to this commit, _any_ line that started with at least 4 spaces or a tab would be considered a code block. For example, the third level of a 2-space-indented list would be highlighted as code, not as list items. Note: this conforms to the original Markdown spec: > To produce a code block in Markdown, simply indent every line of the > block by at least 4 spaces or 1 tab. > A code block continues until it reaches a line that is not indented > (or the end of the article). While this doesn't explicitly state that a blank line _before_ the code block is required, in practical testing, it is. As such, I've included the requirement of a blank line preceeding the indent to match the region start. Any line not indented by at least 4 spaces will end the region. Closes tpope#81 Closes tpope#164 Closes tpope#94 (possibly) Closes tpope#140
Prior to this commit, _any_ line that started with at least 4 spaces or a tab would be considered a code block. For example, the third level of a 2-space-indented list would be highlighted as code, not as list items. Note: this conforms to the original Markdown spec: > To produce a code block in Markdown, simply indent every line of the > block by at least 4 spaces or 1 tab. > A code block continues until it reaches a line that is not indented > (or the end of the article). While this doesn't explicitly state that a blank line _before_ the code block is required, in practical testing, it is. As such, I've included the requirement of a blank line preceeding the indent to match the region start. Any line not indented by at least 4 spaces will end the region. Closes #81 Closes #164 Closes #94 (possibly) Closes #140
I have the following in a markdown file:
It my case, I'm using two spaces for indentation, which means the start of the second line is on a 4 space boundary. It then renders as code--which can be seen in the screenshot below. I realize it's a painful use-case, but it would be nice to see it fixed.
The text was updated successfully, but these errors were encountered: