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

Bug: "Emmet: Go to Matching Pair" doesn't work when the closing tag contains whitespace #132873

Open
alexolog opened this issue Sep 10, 2021 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues emmet-parse Issue caused by the current Emmet parser
Milestone

Comments

@alexolog
Copy link

Issue Type: Bug

Try the following XML:

<tag>
</tag >

"Emmet: Go to Matching Pair" does not work when the cursor is in either the opening or the closing tag.
When the extra space is removed, the operation succeeds.

Note: Whitespace after the tag name is legal.
See https://stackoverflow.com/a/3314543/181238

VS Code version: Code 1.60.0 (e7d7e9a, 2021-09-01T10:43:02.136Z)
OS version: Linux x64 5.4.0-81-generic
Restricted Mode: No
Fetching remote diagnostics for 'SSH: ttdlxapp-tge21' failed: Canceled

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz (2 x 2303)
GPU Status 2d_canvas: unavailable_software
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Load (avg) 0, 0, 0
Memory (System) 7.78GB (0.61GB free)
Process Argv --crash-reporter-id 42997b2d-0a94-4c8d-943a-4cf28513cc90
Screen Reader no
VM 100%
DESKTOP_SESSION xubuntu
XDG_CURRENT_DESKTOP XFCE
XDG_SESSION_DESKTOP xubuntu
XDG_SESSION_TYPE x11
Extensions (22)
Extension Author (truncated) Version
Bookmarks ale 13.2.1
gitlens eam 11.6.0
better-cpp-syntax jef 1.15.6
vscode-docker ms- 1.16.1
python ms- 2021.9.1218897484
vscode-pylance ms- 2021.9.1
jupyter ms- 2021.8.2041215044
jupyter-keymap ms- 1.0.0
remote-containers ms- 0.194.0
remote-ssh ms- 0.65.7
remote-ssh-edit ms- 0.65.7
cmake-tools ms- 1.8.1
cpptools ms- 1.6.0
cpptools-extension-pack ms- 1.0.0
text-power-tools qcz 1.29.0
java red 0.81.0
vscode-commons red 0.0.6
vscode-xml red 0.18.0
vc6-keybindings sam 0.2.0
cmake twx 0.0.17
vscodeintellicode Vis 1.2.14
vscode-java-debug vsc 0.35.0

(1 theme extensions excluded)

@rzhao271 rzhao271 added bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues labels Sep 10, 2021
@rzhao271 rzhao271 added this to the October 2021 milestone Sep 10, 2021
@rzhao271 rzhao271 added the emmet-parse Issue caused by the current Emmet parser label Oct 11, 2021
@vinku
Copy link
Contributor

vinku commented Oct 22, 2021

@rzhao271, I looked at it a bit,
It looks like the issue is in the external package emmetio/html-matcher.
Whenever there is whitespace in closing tag, it is returning a root with malformed html structure (closing tag is missing) and that is why vscode is not able to select the closing tag when the command "Emmet: Go To matching pair " is used.

I have another question: why are we using version 0.3.0 of emmetio/html-matcher when the latest version is 1.3.0

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 emmet Emmet related issues emmet-parse Issue caused by the current Emmet parser
Projects
None yet
Development

No branches or pull requests

3 participants