Skip to content

Adding 'markdown' to g:markdown_fenced_languages results in lots of errors #217

@scy

Description

@scy

I'm documenting a Markdown-based software, and thus I have fenced code blocks that start with ```markdown.

When I try to add 'markdown' to the list in g:markdown_fenced_languages, Vim (and Neovim) eats a lot of CPU for a second, then throws a lot of errors at me:

Error detected while processing /usr/share/nvim/runtime/syntax/markdown.vim:                                                             
line   29:                                                                                                                               
E847: Too many syntax includes                                                                                                           
line   31:                                                                                                                               
E121: Undefined variable: s:done_include                                                                                                 
line  105:                                                                                                                               
E121: Undefined variable: main_syntax                                                                                                    
line  165:                                                                                                                               
E121: Undefined variable: main_syntax                                                                                                    
line   31:                                                                                                                               
E121: Undefined variable: s:done_include                                                                                                 
line  105:                                                                                                                               
E121: Undefined variable: main_syntax
[…]

I assume I've hit some kind of infinite recursion.

Initializing s:done_include with {'markdown': 1} in syntax/markdown.vim (so that it won't try to include itself) gets rid of the errors, but also doesn't give me any syntax highlighting inside of ```markdown blocks.

I'm using the bundled version of this plugin, with the syntax file being tagged Last Change: 2020 Jan 14.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions