在 Slate 中禁用语法错误突出显示
Disabling syntax error highlighting in Slate
当 JSON 片段中有一些额外的元素时,有没有办法禁用错误突出显示。我的用例是我想在 JSON 中包含注释以使其更易于理解。我知道这不是语言规范的一部分,但是在没有红色高亮的情况下做这样的事情会很酷:
{
// this field contains some textual description of the problem occurred
"description": "Resource not found"
}
是否可以在不修改包含的 gem 的情况下轻松影响突出显示样式?
提前致谢!
其实答案很简单。必须使用 json-doc 语法突出显示。在您的 MD 文件中:
```json-doc
// this field contains some textual description of the problem occurred
"description": "Resource not found"
```
当 JSON 片段中有一些额外的元素时,有没有办法禁用错误突出显示。我的用例是我想在 JSON 中包含注释以使其更易于理解。我知道这不是语言规范的一部分,但是在没有红色高亮的情况下做这样的事情会很酷:
{
// this field contains some textual description of the problem occurred
"description": "Resource not found"
}
是否可以在不修改包含的 gem 的情况下轻松影响突出显示样式?
提前致谢!
其实答案很简单。必须使用 json-doc 语法突出显示。在您的 MD 文件中:
```json-doc
// this field contains some textual description of the problem occurred
"description": "Resource not found"
```