Skip to content

Syntax error in tagged code block breaks highlighting outside the code block. #283

Open
@nybblr

Description

@nybblr

Hey folks, I'm using vim-pandoc for editing a coding book. Most of the book is incomplete JavaScript code samples. It seems that when there is a syntax error in a marked code snippet — such as a missing parenthesis or curly — it breaks all following syntax highlighting. Here's an example:

# Hello world

Here's a code block with a syntax error:

```javascript
let app = express();
app.use((req, res) => {
  /* ... */
```

When I continue afterwards, the `missing` parenthesis and *curly* break syntax highlighting outside the code block.

Since the book is primarily made of incomplete snippets, it's tricky to workaround and makes it difficult to spellcheck or spot other errors.

Thoughts? Is this a can of worms in Vim's syntax highlighting engine?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions