Skip to content
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

Nested string interpolation is broken in TypeScript #1590

Closed
pkaminski opened this issue Aug 21, 2017 · 3 comments
Closed

Nested string interpolation is broken in TypeScript #1590

pkaminski opened this issue Aug 21, 2017 · 3 comments

Comments

@pkaminski
Copy link
Contributor

When trying to nest interpolated strings in TypeScript the string never gets "closed" and the rest of the code doesn't get properly formatted. Here's a repro using highlight.js 9.12.0: https://jsfiddle.net/91twpfa2/3/ Note that this works correctly with the language set to JavaScript so hopefully just needs the relevant fix applied to the TypeScript language definition.

(Downstream bug report: Reviewable/Reviewable#498)

@levilansing
Copy link

I took a peek at this the other day. The typescript definition is missing the concept of substring nesting that exists in the Javascript language file.

Relevant lines in languages/javascript.js and languages/typescript.js

It'd be easier to see the difference if the typescript language file were refactored a little to match the JS file.

@rictic
Copy link
Contributor

rictic commented Aug 21, 2019

I forgot to mention it on the PR, but this should be fixed by #2105

https://jsfiddle.net/yd4ume3s/1/

@marcoscaceres
Copy link
Contributor

Great! Closing as fixed by #2105.

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

No branches or pull requests

4 participants