monaco-editor version: 0.11.1
Browser: Safari, Chrome, Firefox, Edge
OS: Mac OS, Windows
Steps or JS usage snippet reproducing the issue:
Open the hover provider example in the playground and you'll notice two issues:
The **SOURCE** markdown content is not shown since it now expects it to be { value: '**SOURCE**'} according to this code: https://github.com/Microsoft/monaco-editor/blob/32f54336573831e97bfd1ac07da625eb6c7133fd/monaco.d.ts#L4502-L4513
https://github.com/Microsoft/monaco-editor/blob/32f54336573831e97bfd1ac07da625eb6c7133fd/monaco.d.ts#L370-L373
It does not seem like it supports code blocks anymore (Unless I'm missing something) so the { language: 'html', value: res.responseText.substring(0, 200) } content just becomes unstyled markdown content rather than a code block with syntax highlighting like it did before.
I can reproduce this problem also.
After you fix the problem, the hover does render the content just fine. However, the first time the hover appears it will not be styled. Subsequent hovers will have the content styled with syntax highlighting colours as expected.
A related comment: hover markdown works fine if enclosed as above: {value: 'markdown string'}. However links in markdown are not clickable (though they display as links):
{ value: '**SOURCE** [link](www.google.com)'}
Displays a non-clickable link in the hover. It would be very useful to have clickable links in hover so that line decorations for error could hover error descriptions with links to further info.
Am I doing something silly here? Perhaps there is some security setting I need to change?
@alexandrudima Thanks for fixing the example. Can you reproduce the "double hover" problem I described in my comment? I can open a separate issue about it if desired.
Hmm, I wonder why that would be the case. It is possible if the hover uses a language which is not yet loaded, that the hover triggers the loading of the language, and then on subsequent hovers the language/tokenizer will be there to tokenize.
Yes, please open a separate issue.
Thanks for checking, @alexandrudima. I've opened #812 to track this.