microsoft / vscode-markdown-tm-grammar

VS Code built-in markdown extension's Textmate grammar
MIT License
64 stars 49 forks source link

Line endings in inline code spans in Markdown #124

Closed Vivelin closed 1 year ago

Vivelin commented 2 years ago

Type: Bug

Given the following markdown:

Execute migrations using `Update-Database` from the Package Manager Console in 
Visual Studio if necessary, or use `Script-Migration -Idempotent -Context
SpdContext`.

The second inline code span contains a line ending, which causes the entire code span to not be highlighted as such:

image

It does render correctly. The CommonMark spec states that line endings are converted to spaces, implying they are supported.

VS Code version: Code 1.70.2 (e4503b30fc78200f846c62cf8091b76ff5547662, 2022-08-16T05:35:13.448Z) OS version: Windows_NT x64 10.0.22000 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 x 3302)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.70GB (3.31GB free)| |Process Argv|C:\\Source\\Streetlife vNext\\README.md --crash-reporter-id 3de3fa3b-2a5a-4162-9540-e1c2095e57e3| |Screen Reader|no| |VM|0%|
Extensions (10) Extension|Author (truncated)|Version ---|---|--- vscode-sql-formatter|adp|1.4.4 ng-template|Ang|14.1.0 data-workspace-vscode|ms-|0.3.0 mssql|ms-|1.16.0 sql-bindings-vscode|ms-|0.3.0 sql-database-projects-vscode|ms-|0.19.0 vscode-typescript-tslint-plugin|ms-|1.3.4 material-icon-theme|PKi|4.20.0 ayu|tea|1.0.5 html-preview-vscode|tht|0.2.5 (6 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonvspyt551:30345470 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411cf:30557515 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vscaat:30438848 pylanb8912:30545647 vsclangdf:30486550 c4g48928:30535728 hb751961:30553087 dsvsc012:30540252 azure-dev_surveyone:30548225 i497e931:30553904 ```
fitiskin commented 2 years ago

This goes same to bold, strikethrough, etc.

tomputer-g commented 1 year ago

Hi, can I give this a shot? I am new to the project so any pointers would be appreciated as well :)

Edit: I tried this for myself - the preview renders correctly but the highlight in the editor doesn't work instead. image

mjbvz commented 1 year ago

Duplicate of #36