如何使用 textMateRules 在 VS Code 中为空格加下划线?

How can I underline whitespaces in VS Code using textMateRules?

我正在使用 VS Code,并希望在源代码中显示带有下划线的降价标题。我添加了以下配置:

"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": [
                "markup.heading.markdown",
            ],
            "settings": {
                "foreground": "#C0C3CA",
                "fontStyle": "underline",
            }
        },
    ],
}

这基本上行得通。但是单词之间的空格没有下划线,请看这个截图:

有没有可能也给这些加下划线?

根据范围检查员的说法,空格也有 markup.heading.markdown 范围,就像单词一样。所以我不明白为什么他们没有下划线。

有什么想法吗?

"editor.renderWhitespace": "all"设置冲突。

您可以在 GitHub 上找到更多关于它发生的原因: