interactive icon indicating copy to clipboard operation
interactive copied to clipboard

text/markdown mime type no supported as output

Open mika76 opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. If I had to write display("# something", "text/markdown") it comes back with an error that text/markdown mimetype is not supported

Describe the solution you'd like It would be nice to show markdown like you show html

Describe alternatives you've considered Other than displaying as plain text or html I don't know of any work around

mika76 avatar Apr 22 '22 10:04 mika76

You can use the DisplayAs extension method:

image

The DisplayAs() method (which extends string) displays the existing string, unchanged, using the specified MIME type.

The Display() extension method (and the older, more Pythonesque display() method) generate a string from objects of any type and then DisplayAs() the specified MIME type.

So you can think of this...

image

As essentially combining these two steps:

image

(The reason the last one renders as a table is because HTML is valid within Markdown, but notice the difference between how VS Code renders the HTML versus the HTML-within-Markdown.)

jonsequitur avatar Jun 29 '22 03:06 jonsequitur