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

syntax highlighting failures in TS files #3545

Closed
haraldschilly opened this issue Feb 6, 2019 · 4 comments
Closed

syntax highlighting failures in TS files #3545

haraldschilly opened this issue Feb 6, 2019 · 4 comments

Comments

@haraldschilly
Copy link
Contributor

I assume this is a codemirror upstream issue, but I'm still posting this here in case there are more than just me noticing such an issue. The problem is, after a certain point in the .ts file -- I always saw this in conjunction with string interpolation backticks (!) -- all highlighting is gone. Editing plain orange code text is only half the fun 🙈 I'm also wondering if this affects other types of files …

screenshot from 2019-02-06 09-48-13

@slel
Copy link
Contributor

slel commented Feb 6, 2019

Interference involving combining backticks and dollar signs?

@williamstein
Copy link
Contributor

williamstein commented Feb 6, 2019

Here is a minimal .ts example to reproduce the problem:

class Foo {
  f(obj) {
    for (let key in obj) {
    }
  }

  g(a: string): void {
    if (!this.h(a)) {
      throw Error(`${a}`);
    }
  }

  // This should not be red!
  h(a: string): boolean {
    //...
  }
}

Paste that into the official demo and you'll see:

image

I've created an upstream issue: codemirror/codemirror5#5774

@williamstein
Copy link
Contributor

This is now fixed upstream.

@haraldschilly
Copy link
Contributor Author

that's how it looks in cocalc. closing.

Screenshot from 2019-08-20 17-54-47

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

No branches or pull requests

3 participants