Skip to content

Backticks with curly braces in JSX break highlighting #173

@roblevy

Description

@roblevy

I'm using pangloss/vim-javascript as my highlighting dependency. I've read the README.md.

When I'm writing JSX and have ES6-style backticks and ${} in my code, the highlighting breaks from there until the end of the file.

          <Link to={`/news/${post._id}`} key={post._id}>
            <div className='post-card'>
              <h3>{post.title}</h3>
              <ReactMarkdown className='markdown' disallowedTypes={['link', 'heading']} unwrapDisallowed={true} source={post.preview} />
            </div>
          </Link>

This renders as:
Highlighting error

Minimal .vimrc

set nocompatible              " be iMproved, required
filetype plugin indent on
syntax on

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'

call vundle#end()            " required

" Colour scheme
syntax enable
set t_Co=256
set background=light

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