Open wheelercj opened 3 months ago
I'm currently planning on making the default option "markdown", not "GitHub Flavored Markdown (GFM)", because even though GFM is the main flavor of markdown Stardown should support, it may be useful to allow slightly lower quality GFM output for rarely used markdown features in return for significantly higher compatibility with other markdown flavors. Then anyone who knows they only need GFM can change the setting from "markdown" to "GitHub Flavored Markdown (GFM)" to get the high quality GFM output. Also, some of GFM's features depend on its support for many HTML elements, but it will probably be good to have a way to generate pure markdown without any HTML because some tools, like Hugo, allow using markdown but don't allow using HTML by default.
To help prioritize which markup languages to add support for, I searched various markup languages on Google Search Trends to get an approximate measure of their popularity. The results are below. For some of them, I used a different search term like "overleaf" instead of "LaTeX" because unrelated topics were heavily affecting the results.
This is only an approximate ordering of their popularity, not necessarily the order in which these might be added to Stardown, and the list is not exhaustive.
On Google Trends, if "markdown" and "overleaf" are compared with any of the others, the others appear as nearly flat lines at around 0% interest. Overleaf hovers at around half the interest of markdown. Due to that, the chances I will put in the work to add full support for markup languages besides markdown, LaTeX, HTML, and JSON without someone else's help are low.
Alt+C
to immediately download a PDF of what they selected. Maybe when nothing is selected, pressing Alt+C
would make a PDF of the entire page, but then the end result might be the same as browsers' existing feature to print pages as PDFs unless Stardown converts the content in a different way.I haven't read much about the various markdown flavors yet, but two of the most important ones appear to be GitHub Flavored Markdown (GFM) and Pandoc's Markdown.
More are listed here: Markdown Flavors · commonmark/commonmark-spec Wiki.
Currently, Stardown only writes to the clipboard with navigator.clipboard.writeText, not with navigator.clipboard.write. It's unclear to me right now whether Stardown should ever support multiple MIME types.
Here's an interesting blog post on this topic: The web's clipboard, and how it stores data of different types. Related HN discussion: The web's clipboard, and how it stores data of different types | Hacker News.
I didn't know until I recently read the CommonMark spec that CommonMark also includes some HTML elements. Stardown currently has two options for the output markup language: "markdown" and "HTML". I think it would be good to have the third option I add be "markdown with some HTML" which keeps as HTML any HTML elements that don't always render well as markdown.
Many markdown editors that render any HTML elements appear to also support some elements not listed in the CommonMark spec, such as sup
and sub
.
Currently, Stardown focuses mostly on GitHub Flavored Markdown (GFM), but there are many flavors of markdown and many other markup languages.
Examples of markup languages:
Comparison of features in various Markdown flavors
Lightweight markup language - Wikipedia
List of document markup languages - Wikipedia
Markup lowdown: 4 markup languages every team should know | Opensource.com
18 Best markup languages as of 2024 - Slant
[x] A setting could be added to let the user choose the markup language of Stardown's output.
[x] This feature requires many changes to how Stardown converts HTML to other formats, so #105 should be completed first.