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

No syntax highlighting on single-line XML #41593

Closed
HTD opened this issue Jan 14, 2018 · 7 comments
Closed

No syntax highlighting on single-line XML #41593

HTD opened this issue Jan 14, 2018 · 7 comments
Assignees

Comments

@HTD
Copy link

HTD commented Jan 14, 2018

  • VSCode Version: Code - Insiders 1.20.0-insider (ca023a7, 2018-01-12T05:14:50.541Z)
  • OS Version: Windows_NT x64 10.0.16299
  • Extensions (7)
    Extension Author (truncated) Version
    vscode-markdownlint Dav 0.12.1
    vscode-eslint dba 1.4.3
    xml Dot 1.9.2
    tslint eg2 1.0.24
    python ms- 0.9.1
    csharp ms- 1.13.1
    team ms- 1.122.0

Steps to Reproduce:

  1. Open file C:\Windows\Performance\WinSAT\DataStore*Formal.Assessment (Initial).WinSAT.xml
  2. Notice that XML syntax is not highlighted since this XML is all in one line, however it is still a perfectly valid XML and as such should be highlighted.

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the insiders label Jan 14, 2018
@aeschli
Copy link
Contributor

aeschli commented Jan 15, 2018

@HTD Can you paste that line to this issue?

@aeschli aeschli self-assigned this Jan 15, 2018
@typeoneerror
Copy link

@aeschli same issue here. a .js file with an array that is 11566 characters on one line (can't share the data, unfortunately private). I can share that syntax highlighting stops at column 1000 which seems significant.

@aeschli
Copy link
Contributor

aeschli commented Jan 17, 2018

Oh, now remember. We have a limit on the line length (20'000 characters). Lines that are longer will not be colourized. That's necessary for performance reasons.

@aeschli aeschli closed this as completed Jan 17, 2018
@typeoneerror
Copy link

@aeschli just to confirm, I have a 11,566 character file and if I delete everything after character 1000, highlighting starts working again. Should my file not be syntax highlighted at < 20K? Looks like the limit is actually 1000? 🧐

@aeschli
Copy link
Contributor

aeschli commented Jan 18, 2018

The code says 20'000, and its also what I see:
image
image

@aeschli
Copy link
Contributor

aeschli commented Jan 18, 2018

Please paste your example to a gist or in this issue, maybe it's something else.

@typeoneerror
Copy link

@aeschli below is 1022 characters.

screenshot 2018-01-18 12 36 20

Deleting to 1000 and syntax shows up again:

screenshot 2018-01-18 12 36 44

1022 data:

/* eslint-disable*/ export const hpData = [{"name":"TESTING","type":"ABC","values":[10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000]},{"name":"TESTING","type":"ABC","values":[null,null,null,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000]},{"name":"TESTING","type":"ABC","values":[null,null,null,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000]},{"name":"TESTING","type":"ABC","values":[null,null,null,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000]},{"name":"TESTING","type":"ABC","values":[null,null,null,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000]}]; 
  • VSCode Version: Code 1.19.2 (490ef76, 2018-01-10T15:49:04.682Z)
  • OS Version: Darwin x64 17.3.0
  • Extensions:
Extension Author (truncated) Version
bracket-pair-colorizer Coe 0.10.14
vscode-eslint dba 1.4.4
flow-for-vscode flo 0.7.3
vscode-language-babel mgm 0.0.11
debugger-for-chrome msj 4.0.0
Ruby reb 0.15.0
vscode-icons rob 7.19.0
language-stylus sys 1.8.0
vim vsc 0.10.11
vscode-todo-highlight way 0.5.11

Could be issue with Babel Javascript syntax highlighter?

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants