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, code highlighted indented multi-line command (shell, using backslash, line continuation \) every 2nd line only #231408

Closed
needleshaped opened this issue Oct 15, 2024 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@needleshaped
Copy link

Type: Bug

  1. Open new markdown file
  2. Paste following:
echo \
ls -la \
ls -la \
  ls -la \
  ls -la \
  ls -la
tar \
    -cvzf \
    archive.tar.gz \
    file1.txt \
    file2.txt \
    file3.txt \
    file4.txt \
    file5.txt
  1. Observe highlighting applied only on every second line.
  2. Remove indent. Highlighting works now.

Screenshot below compares highlighting from Markdown code to highlighting in native shell and Markdown preview.

Image

P.S. I've found, that highlighting inside code block in Markdown is done by https://github.com/microsoft/vscode-markdown-tm-grammar

Version: 1.94.2 (user setup)
Commit: 384ff73
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

Extensions: none

@needleshaped
Copy link
Author

Registered this bug in microsoft/vscode-markdown-tm-grammar#166, after I found out that highlighting inside code block in Markdown is done by it. Correct me, if I'm wrong.

@mjbvz
Copy link
Collaborator

mjbvz commented Oct 15, 2024

Closing as duplicate of the upstream issue (microsoft/vscode-markdown-tm-grammar#166)

@mjbvz mjbvz closed this as completed Oct 15, 2024
@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 15, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants