[英]Using markdown in IMarkerData
I am trying to implement diagnostics to my language-service.我正在尝试对我的语言服务实施诊断。 According to the following question I got that I can't use html to customize my messages but I can use markdown syntax.
根据以下问题,我得到我不能使用 html 来自定义我的消息,但我可以使用 markdown 语法。
Can markers support html display just like hoverProvider do?标记能否像 hoverProvider 一样支持 html 显示?
However when I try to use markdown syntax for markers I got the message as it is.但是,当我尝试对标记使用 markdown 语法时,我得到了消息。
monaco.editor.setModelMarkers(model, this._selector, markers);
// "# Big Title \\n Please google it [Google](https://www.google.com) " as a message
I got the string as it is.我得到了字符串。
You can use the code
property of the IMarkerData object.您可以使用IMarkerData object 的
code
属性。
{
...
code: {
target: 'https://www.google.com',
value: 'Google'
}
}
This will add the link with the text Google
like this这将像这样添加带有文本
Google
的链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.