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

Markdown Syntax of Strikethrough Highlighting mismatch with preview. #146610

Closed
laazy opened this issue Apr 2, 2022 · 6 comments · Fixed by microsoft/vscode-markdown-tm-grammar#107
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug grammar Syntax highlighting grammar help wanted Issues identified as good community contribution opportunities markdown Markdown support issues verified Verification succeeded
Milestone

Comments

@laazy
Copy link

laazy commented Apr 2, 2022

We have written the needed data int
Issue Type: Bug

  1. type ~delete word~
  2. it displayed in editor as delete word, same as the github deal with single tilde
  3. click open preview, it shows as ~delete word~

As vscode documents mentioned,

VS Code targets the CommonMark Markdown specification using the markdown-it library.

Vscode editor should not treat single tilde as strikethroug according to markdown-it, and it should act same with preview window.

VS Code version: Code - Insiders 1.67.0-insider (8b7086a, 2022-04-01T05:16:02.350Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 5 3600 6-Core Processor (12 x 3593)
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
oop_rasterization: enabled
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.95GB (1.94GB free)
Process Argv --crash-reporter-id 3ca66572-e046-4df9-bfdd-5f4e15550577
Screen Reader no
VM 0%
Extensions: none o your clipboard because it was too large to send. Please paste.
@mjbvz mjbvz added help wanted Issues identified as good community contribution opportunities markdown Markdown support issues grammar Syntax highlighting grammar labels Apr 4, 2022
@laazy
Copy link
Author

laazy commented Apr 5, 2022

what it looks like:
image

@babakks
Copy link
Contributor

babakks commented Apr 11, 2022

@mjbvz I've just submitted a PR for this.

@Lemmingh
Copy link
Contributor

Though I also feel very strange about this single-tilde-strikethrough, there are explicit test cases for it.

I guess it would be best to discuss with the original contributor first, even if it's just a mistake.

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 11, 2022

@Lemmingh It's likely an oversight. If the common mark spec says to use two tildes, that's what we should support

@Lemmingh
Copy link
Contributor

Yeah, GFM requires two tildes:
https://github.github.com/gfm/#strikethrough-extension-

@Lemmingh
Copy link
Contributor

Um, interesting fact:

GFM requires "two tildes", but cmark-gfm still accepts "single tilde", which is an intentional mismatch for backward compatibility and causes confusion between implementations.

Still, aligning with the spec should be the right way.

@mjbvz mjbvz added this to the April 2022 milestone Apr 12, 2022
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Apr 12, 2022
mjbvz added a commit that referenced this issue Apr 12, 2022
@lramos15 lramos15 added the verified Verification succeeded label Apr 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug grammar Syntax highlighting grammar help wanted Issues identified as good community contribution opportunities markdown Markdown support issues verified Verification succeeded
Projects
None yet
5 participants