microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.88k stars 29.16k forks source link

Non-quoted attribute value in emmet abbreviation breaks parsing with attribute later down in abbreviation #126780

Open Koneke opened 3 years ago

Koneke commented 3 years ago

Issue Type: Bug

In emmet abbreviations with several tag attributes included, a non-quoted attribute value causes the entire abbreviation until the next tag with an attribute to not be expanded.

Expected:

a[href=#]>p>a[href=#]

should expand into:

<a href="#">
  <p><a href="#"></a></p>
</a>

but instead expands into:

a[href=#]>p><a href="#"></a>

I.e., it expands as if everything up until the final a[href=#] was ignored.

This has been tried with extensions entirely disabled, with other emmet abbreviation structures, and with different attribute values, to the same result.

vscode-1624192446163

(edit: included recording)

VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:28:07.755Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz (4 x 3498)| |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)|7.94GB (1.76GB free)| |Process Argv|--crash-reporter-id 378cd57f-0e8a-4c1c-ab47-db31f5325277| |Screen Reader|no| |VM|0%|
Extensions (15) Extension|Author (truncated)|Version ---|---|--- emmet-keybindings|agu|1.0.1 chronicler|arc|0.1.11 vscode-tailwindcss|bra|0.6.11 todo-tree|Gru|0.0.213 rest-client|hum|0.24.5 csharp|ms-|1.23.12 python|ms-|2021.6.944021595 vscode-pylance|ms-|2021.6.2 jupyter|ms-|2021.6.999406279 remote-wsl|ms-|0.56.5 cpptools|ms-|1.4.1 mono-debug|ms-|0.16.2 godot-csharp-vscode|nei|0.1.3 vim|vsc|1.21.3 vsc-jsonsnippets|wmo|0.9.3
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vstes627:30244334 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551cf:30311713 vspre833:30321513 pythonptprofiler:30281270 vshan820:30294714 pythondataviewer:30285071 vscus158:30321503 pythonvsuse255:30323308 vscorehov:30309549 vscod805:30301674 vscextlangct:30322307 binariesv615:30323119 vsccppwt:30322536 ```
rzhao271 commented 3 years ago

Created an upstream issue. The abbreviation expands properly, but it's not being extracted properly in the first place.