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

[html] Unexpected "Declaration or statement expected" in HTML code #135849

Open
oliversalzburg opened this issue Oct 26, 2021 · 1 comment · May be fixed by #171547
Open

[html] Unexpected "Declaration or statement expected" in HTML code #135849

oliversalzburg opened this issue Oct 26, 2021 · 1 comment · May be fixed by #171547
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug html HTML support issues
Milestone

Comments

@oliversalzburg
Copy link

Issue Type: Bug

This code will cause VS Code to raise 3 JS problems

<!DOCTYPE html><html><body><script>//%SCRIPT%</script><script>(function() {
}());</script></body></html>

Changing the code slightly, resolves the problems

<!DOCTYPE html><html><body><script>//%SCRIPT%</script>
<script>(function() {
}());</script></body></html>

To me, this is unexpected.

VS Code version: Code 1.61.2 (6cba118, 2021-10-19T14:57:20.575Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3592)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 79.87GB (42.74GB free)
Process Argv --folder-uri=vscode-remote://wsl+Ubuntu/home/oliver/fairmanager/fairmanager/core-web3 --remote=wsl+Ubuntu --crash-reporter-id 05565d81-cfc4-40de-88df-1c479bbe1bcd
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.16.3-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3591)
Memory (System) 62.71GB (50.55GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.16.3-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3591)
Memory (System) 62.71GB (50.55GB free)
VM 0%
Extensions (38)
Extension Author (truncated) Version
tsl-problem-matcher amo 0.5.0
javascript-ejs-support Dig 1.3.1
eslint-disable-snippets drK 1.3.0
output-colorizer IBM 0.1.2
jupyter-keymap ms- 1.0.0
remote-containers ms- 0.202.5
remote-ssh ms- 0.65.8
remote-ssh-edit ms- 0.65.8
remote-wsl ms- 0.58.3
vscode-remote-extensionpack ms- 0.21.0
vscode-icons vsc 11.6.0
vscode-zipfs arc 2.3.0
better-toml bun 0.3.2
vscode-eslint dba 2.2.2
xml Dot 2.5.1
EditorConfig Edi 0.16.4
prettier-vscode esb 9.0.0
generateuuid Fir 0.0.5
shell-format fox 7.1.1
vscode-graphql Gra 0.3.18
yarn2-dependency-explorer hah 0.0.1
terraform has 2.16.0
vscode-esformatter how 1.6.0
vscode-random jre 1.10.0
template-string-converter meg 0.5.3
code-beautifier mic 2.3.3
vscode-docker ms- 1.17.0
vscode-kubernetes-tools ms- 1.3.3
python ms- 2021.10.1365161279
vscode-pylance ms- 2021.10.2
jupyter ms- 2021.9.1101343141
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.3
test-adapter-converter ms- 0.1.4
vscode-js-profile-flame ms- 0.0.21
vscode-paste-image mus 1.0.4
monolit Oli 0.0.33
vscode-yaml red 1.0.0

(1 theme extensions excluded)

@aeschli aeschli added html HTML support issues bug Issue identified by VS Code Team member as probable bug labels Oct 27, 2021
@aeschli aeschli changed the title Unexpected "Declaration or statement expected" in HTML code [html] Unexpected "Declaration or statement expected" in HTML code Oct 27, 2021
@aeschli
Copy link
Contributor

aeschli commented Oct 27, 2021

What's special is that all is on one line. The comment from the first script tag impacts the second one. It's a bug in out code.

@aeschli aeschli added this to the Backlog milestone Oct 27, 2021
johnsoncodehk added a commit to johnsoncodehk/vscode that referenced this issue Jun 23, 2024
@johnsoncodehk johnsoncodehk linked a pull request Jun 23, 2024 that will close this issue
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug html HTML support issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants