markdownDescription 在我的 VS Code 扩展配置中被切断

问题描述 投票:0回答:1

我的 VS Code 扩展配置采用对象数组。我尝试使用

markdownDescription
来描述设置,因为它必须在
settings.json
中手动修改。但是当设置显示在 UI 中时,描述会被切断并以省略号“[...]”结尾。

这是

package.json
中的配置贡献:

    "configuration": {
      "properties": {
        "comblocks.blockComment.styleOverrides": {
          "type": "array",
          "markdownDescription": "Style overrides providing delimiters to use for comment blocks. By default, the \n[current Language Mode](https://code.visualstudio.com/docs/languages/overview#_language-identifier) determines the left and right delimiters. \nThe default top/bottom border character is a dash (`-`).\n\nAny style specifications included here will override the defaults. Each item in\nthis list has the following properties. For properties not included in the\noverride, the default will still apply.\n\n- **languageId** `{string}`  \n  Identifies the language mode to override. The list of currently installed \n  languages and their identifiers can be found in the Change Language Mode \n  (`Ctrl+K M`) dropdown.  \n  This property is required.\n\n- **left** `{string}` *optional*  \n  Character(s) used to start each line of the comment block.\n\n- **right** `{string}` *optional*  \n  Character(s) used to end each line of a the comment block.\n\n- **border** `{string}` *optional*  \n  Character to be used in creating the top/bottom borders of the comment block.\n\n- **single** `{string|string[]}` *optional*  \n  Single-line comment identifiers. These are removed from selected text before\n  building the comment block. \n\n**Predefined Overrides**\n\nThese overrides are predefined but may also be overridden with this setting.\n```json\n[\n  { \"languageId\": \"bat\",          \"left\":\":*\", \"right\":\"*\", \"single\":\":\" },\n  { \"languageId\": \"coffeescript\", \"left\":\"#*\", \"right\":\"*\" },\n  { \"languageId\": \"python\",       \"left\":\"#*\", \"right\":\"*\" },\n  { \"languageId\": \"ruby\",         \"left\":\"#*\", \"right\":\"*\" },\n  { \"languageId\": \"xml\",          \"border\":\"=\" },\n  { \"languageId\": \"xsl\",          \"border\":\"=\" }\n]\n```",
          "items": {
            "type": "object",
            "required": [
              "languageId"
            ],
            "properties": {
              "languageId": {
                "type": "string"
              },
              "left": {
                "type": "string"
              },
              "right": {
                "type": "string"
              },
              "border": {
                "type": "string"
              },
              "single": {
                "type": "string|string[]"
              }
            },
            "additionalProperties": false
          }
        }
      }
    }

这是文件/首选项/设置中的样子: enter image description here

有什么办法可以看到完整的

markdownDescription
吗?

有人有建议吗?

configuration vscode-extensions package.json
1个回答
0
投票

对 VS Code 源代码的研究表明,配置描述的硬编码限制为 20 行。但是,这是通过在换行符

description
字符处简单分割
markdownDescription
\n
属性值来完成的。该代码仅测试超过 20 行、截断并添加省略号 (
[...]
)。

我从 README.md 文件中获取了描述文本,该文件在 Markdown 源代码中有很多换行符。删除换行符并用表格替换项目符号列表使文本减少到 20 行的物理限制内。 UI 中显示的结果描述是可以接受的。

Markdown description rendered in the UI

© www.soinside.com 2019 - 2024. All rights reserved.