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

dos/bat/cmd Disk switch "D:" destroys highlight #4134

Open
krilbe opened this issue Oct 10, 2024 · 1 comment · May be fixed by #4136
Open

dos/bat/cmd Disk switch "D:" destroys highlight #4134

krilbe opened this issue Oct 10, 2024 · 1 comment · May be fixed by #4136
Labels
bug help welcome Could use help from community language

Comments

@krilbe
Copy link

krilbe commented Oct 10, 2024

Describe the issue
If the code snippet contains a disk switch line, e.g. "D:", the subsequent highlight becomes all red. It seems to be connected with the colon.
bild

Which language seems to have the issue?
"dos"

Seems to be the same with tags "bat" and "cmd".

Seems to work the same with and without space between ``` and the language tag.

Here in GitHub it seems to work correctly with tag "bat", see below under "Expected behavior".

Are you using highlight or highlightAuto?
Not sure. I was using this in an Azure DevOps Wiki page.

Sample Code to Reproduce

triplebacktick dos
rem This highlight works.
copy file.txt other.txt 
rem After next line it becomes all red.
D:
cd "D:\Folder"
md Tmp
del Tmp\*.* /q
triplebacktick

Expected behavior
The highlight should work normally even after a disk switch command, as here in GitHub:

rem This highlight works.
copy file.txt other.txt 
rem After next line it becomes all red.
D:
cd "D:\Folder"
md Tmp
del Tmp\*.* /q

Additional context
Found and tested in an Azure DevOps Wiki page, which seems to point to this repo in the docs: https://learn.microsoft.com/en-us/azure/devops/project/wiki/markdown-guidance?view=azure-devops#code-highlighting

@krilbe krilbe added bug help welcome Could use help from community language labels Oct 10, 2024
@the-dg04 the-dg04 linked a pull request Oct 11, 2024 that will close this issue
2 tasks
@the-dg04
Copy link

Hey, ive found a potential solution to your problem and linked a PR for it.

After fix:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants