Why is it so hard to export Markdown from Gemini?
Markdown is supposed to be easy. Sure, there’s a ton of standards and interpretations, but we mostly converge on the same set of plain text ideals.
Why, then, is it next to impossible to produce a Markdown document when, for example, working with Google Gemini?
Prompt: write a short article (around 300 words) about fusion reactors
So far so good.
You can’t just copy paste it, because you don’t get the headings, the formatting, and so on:
The Promise of Starlight: A Look at Fusion Reactors
Fusion reactors represent a monumental leap in our quest for clean, virtually limitless energy. Often described as creating a "star in a jar," these devices aim to replicate the very process that powers our sun: nuclear fusion. By fusing light atomic nuclei, such as the hydrogen isotopes deuterium and tritium, fusion reactors release immense amounts of energy. This process stands in stark contrast to nuclear fission, the technology behind current nuclear power plants, which splits heavy atoms like uranium.
Let’s ask it to give us Markdown.
Ok, same problem. When I copy paste that, I don’t get the Markdown symbols. I guess the LLM is producing Markdown, but it’s not getting through Google’s formatting front end?
Let’s try asking for a downloadable artifact.
…but… there is no link anywhere?
Ok, maybe I misspoke, it should use Canvas, not an artifact. It claims not to know what “Canvas” is, but maybe they designed it so that you don’t call the tool from inside the interaction with the LLM, but instead you have to click the “Canvas” icon. My bad. Let’s redo the article with Canvas.
Predictably, this also cannot be copied as Markdown. We’re running into the same problem as before, just now it’s in Canvas mode.
Let’s ask it again to return the article in Markdown.
Finally!
Well, maybe I’d want to make edits, but I want to be able to see the Markdown in the Canvas. If you ask it to display the Markdown using the canvas, it’ll happily report that it displays raw Markdown, but it still renders it.
Let’s suggest a hack.
Well, it still doesn’t work. How about going even more hacky, and asking it for 6 backticks instead of 3? Nope, it doesn’t work.
Ok, let’s try another approach; let’s specify that the code block is not Markdown, so as to prevent the front end rendering it.
Ok, I give up. No, one last thing before I quit. Let’s export it to Google Docs. I know that Google Docs recently added support for Markdown, so we’ll go around this.
Yeah that’s laggy. But eventually, it did work. Really easy, 1/10!