-
Notifications
You must be signed in to change notification settings - Fork 325
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
Wrong VS Code slugify: Should parse heading by the same markdown-it engine as VS Code's #970
Comments
This comment has been minimized.
This comment has been minimized.
This should not happen after #890, and I cannot reproduce it on the latest dev build (f560819). My result: [UA.NETStandard repo]: u
[CRC32]: r
## [![OPC UA .NET](https://img.shields.io/badge/OPC_UA_.NET-v1.0.4-512BD4?style=flat-square&logo=csharp&color=239120)][UA.NETStandard repo] OPC UA .NET StandardLibrary
## [![`crc32(data)`](https://img.shields.io/badge/crc32-v1.0.0.0-blue?style=flat-square&logo=mathworks)][CRC32] CRC-32 Computation Algorithm
- [ OPC UA .NET StandardLibrary](#-opc-ua-net-standardlibrary)
- [ CRC-32 Computation Algorithm](#-crc-32-computation-algorithm) Configuration: {
"markdown.extension.toc.slugifyMode": "github",
"markdown.extension.toc.unorderedList.marker": "-"
} |
just tested it on v3.4.0 #943. Settings(also attached as .json.txt:"name": "markdown-all-in-one",
"displayName": "%ext.displayName%",
"description": "%ext.description%",
"icon": "images/Markdown-mark.png",
"version": "3.4.0",
"publisher": "yzhang",
"engines": {
"vscode": "^1.49.0"
...
"markdown.extension.toc.slugifyMode": {
"type": "string",
"default": "github",
"markdownDescription": "%config.toc.slugifyMode.description%",
"enum": [
"github",
"azureDevops",
"bitbucketCloud",
"gitea",
"gitlab",
"vscode"
],
"enumDescriptions": [
"GitHub",
"Azure DevOps",
"Bitbucket Cloud",
"Gitea",
"GitLab",
"Visual Studio Code"
]
},
"markdown.extension.toc.unorderedList.marker": {
"type": "string",
"default": "-",
"markdownDescription": "%config.toc.unorderedList.marker.description%",
"enum": [
"-",
"*",
"+"
]
},
"markdown.extension.toc.updateOnSave": {
"type": "boolean",
"default": true,
"description": "%config.toc.updateOnSave.description%"
}
ResultStill the same: I can "jump" to the headers |
The VS Code is using a different slugify (assign a heading an id/anchor) function which is not fully compatible with GitHub. The PDF is created by another extension. So it is quite likely that they are not compatible. If we set the Now the problem is even if we set |
This part is hard to simulate. I suggest thorough redesign. |
Problem
## [![OPC UA .NET](https://img.shields.io/badge/OPC_UA_.NET-v1.0.4-512BD4?style=flat-square&logo=csharp&color=239120)][UA.NETStandard repo] OPC UA .NET StandardLibrary
produces following caption:
[][UA.NETStandard repo] OPC UA .NET StandardLibrary
with TOC entry like:
- [!OPC UA .NET OPC UA .NET StandardLibrary](#uanetstandard-repo-opc-ua-net-standardlibrary)
which is not working properly like a hyperlink.
In a sililar way this feature does not work properly with codespan in captions:
CODE:
## [![`crc32(data)`](https://img.shields.io/badge/crc32-v1.0.0.0-blue?style=flat-square&logo=mathworks)][CRC32] CRC-32 Computation Algorithm
:HEADER:
[][CRC32] CRC-32 Computation Algorithm
CODE TOC (generated):
- [!`crc32(data)` CRC-32 Computation Algorithm](#crc32-crc-32-computation-algorithm)
TOC Entry:
crc32(data)
CRC-32 Computation AlgorithmHow to reproduce
copy code sessions into VS code, generate TOC and turn on preview
Error message in the console
none
The text was updated successfully, but these errors were encountered: