Comments (4)
This is also the case with strikethrough text.
Stuff like :Toc
and :HeaderDecrease
work just fine, but the syntax highlighting is broken.
from vim-markdown.
@lggruspe Curious why you didn't include code
markup in #641 ... is there an issue with ATX vs. SetExt headers here or some other holdup? Would extending the list of contains
fix this?
from vim-markdown.
There's an issue with code span highlighting. The syntax file currently only looks for closing delimiters with 3+ backticks at the start of a line, so code spans like the following don't get closed.
# ```code```
This paragraph gets highlighted as code.
from vim-markdown.
Perhaps just moving htmlH[12]
rules for "Line following heading case\n====
" after mkdCode
rule
works fine as "# preceding heading case
"?
--- a/syntax/markdown.vim
+++ b/syntax/markdown.vim
@@ -85,16 +85,6 @@ syn region mkdLinkTitle matchgroup=mkdDelimiter start=+"+ end=+"+ contained
syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained
syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained
-"HTML headings
-syn region htmlH1 matchgroup=mkdHeading start="^\s*#" end="$" contains=@mkdHeadingContent,@Spell
-syn region htmlH2 matchgroup=mkdHeading start="^\s*##" end="$" contains=@mkdHeadingContent,@Spell
-syn region htmlH3 matchgroup=mkdHeading start="^\s*###" end="$" contains=@mkdHeadingContent,@Spell
-syn region htmlH4 matchgroup=mkdHeading start="^\s*####" end="$" contains=@mkdHeadingContent,@Spell
-syn region htmlH5 matchgroup=mkdHeading start="^\s*#####" end="$" contains=@mkdHeadingContent,@Spell
-syn region htmlH6 matchgroup=mkdHeading start="^\s*######" end="$" contains=@mkdHeadingContent,@Spell
-syn match htmlH1 /^.\+\n=\+$/ contains=@mkdHeadingContent,@Spell
-syn match htmlH2 /^.\+\n-\+$/ contains=@mkdHeadingContent,@Spell
-
"define Markdown groups
syn match mkdLineBreak / \+$/
syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLink,mkdInlineURL,mkdLineBreak,@Spell
@@ -117,6 +107,16 @@ syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*\(\*\|\s\)*$/
syn match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-\(-\|\s\)*$/
syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_\(_\|\s\)*$/
+"HTML headings
+syn region htmlH1 matchgroup=mkdHeading start="^\s*#" end="$" contains=@mkdHeadingContent,@Spell
+syn region htmlH2 matchgroup=mkdHeading start="^\s*##" end="$" contains=@mkdHeadingContent,@Spell
+syn region htmlH3 matchgroup=mkdHeading start="^\s*###" end="$" contains=@mkdHeadingContent,@Spell
+syn region htmlH4 matchgroup=mkdHeading start="^\s*####" end="$" contains=@mkdHeadingContent,@Spell
+syn region htmlH5 matchgroup=mkdHeading start="^\s*#####" end="$" contains=@mkdHeadingContent,@Spell
+syn region htmlH6 matchgroup=mkdHeading start="^\s*######" end="$" contains=@mkdHeadingContent,@Spell
+syn match htmlH1 /^.\+\n=\+$/ contains=@mkdHeadingContent,@Spell
+syn match htmlH2 /^.\+\n-\+$/ contains=@mkdHeadingContent,@Spell
+
" YAML frontmatter
if get(g:, 'vim_markdown_frontmatter', 0)
syn include @yamlTop syntax/yaml.vim
from vim-markdown.
Related Issues (20)
- left arrow highlighted in markdown HOT 2
- Nested list highlight broken for tabs HOT 2
- Basic Usage - za, zA documentation is incorrect
- code fenced block for lua not working well HOT 2
- styles mis-matches closing symbols present inside a nested codeblock
- g:vim_markdown_auto_extension_ext not working for .qmd files HOT 1
- when inputting `o` in normal mode at a list item, unexpected indentation occurs. HOT 9
- Enable checklist box toggle if mouse support is enabled? HOT 1
- is there any possible to indent `#` (shell comments) inside the code block via `>>`
- Link conceal not working with symbols in link text
- syntax higlighting always fails
- deleting parts of code blocks cause all folds to collapse
- Support highlighting multiple YAML blocks HOT 1
- Highlighting \[...\] pairs in latex
- Support commonmark links with parentheses
- Disabling concealing of code blocks also disables concealing of inline code HOT 1
- Cursor in heading, show computed anchor for that heading? HOT 1
- Autocomplete heading anchors when creating links HOT 1
- URLs with parenthesis have invalid conceal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-markdown.