3

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.

Can markers support html display just like hoverProvider do?

However when I try to use markdown syntax for markers I got the message as it is.

 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.

enter image description here

SoftTimur
  • 5,630
  • 38
  • 140
  • 292
Rami ZK
  • 510
  • 3
  • 13
  • Hello, i encountered the same problem as well(markdown syntax does not work in markers), do you have a solution or any ideas? – Limboer Oct 22 '20 at 06:05

1 Answers1

0

You can use the code property of the IMarkerData object.

{
  ...
  code: {
    target: 'https://www.google.com',
    value: 'Google'
  }
} 

This will add the link with the text Google like this

enter image description here

Rishab Jain
  • 269
  • 4
  • 16