Skip to content

Highlight escaped backticks in a interpolation string correctly #54

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

Closed
ryyppy opened this issue Jan 21, 2022 · 1 comment · Fixed by #55
Closed

Highlight escaped backticks in a interpolation string correctly #54

ryyppy opened this issue Jan 21, 2022 · 1 comment · Fixed by #55

Comments

@ryyppy
Copy link
Member

ryyppy commented Jan 21, 2022

Given following code:

let a = "abc"


let str = "aaa\"bbb"

Js.log(` \` ccc ${a} ddd  `)


Js.log(`a = ${a}`)

Js.log(``)

let b = 34

let parser = %raw(`
  
adsfadsfzz
`)

Will break the syntax highlighting:

image

We fixed this in rescript-vscode with a negative lookbehind that also matches escaped backticks, but we couldn't get it to work for vim yet.

@amiralies any idea how to solve this? Would be even greater to highlight the escaped backtick in a different color, like in common strings.

@amiralies
Copy link
Collaborator

Will take a look tomorrow. It should be trivial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants