linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Add `Markdoc`, `.mdoc`

Open jasikpark opened this issue 1 year ago • 3 comments

Language name

Markdoc - https://markdoc.dev

URL of example repository

https://github.com/withastro/astro/blob/main/examples/with-markdoc/src/content/docs/intro.mdoc https://github.com/markdoc/docs/blob/main/pages/index.md

URL of syntax highlighting grammar

https://github.com/markdoc/language-server/tree/main/syntaxes

Most popular extensions

.mdoc, .md

Detected language

Roff

jasikpark avatar Feb 26 '24 17:02 jasikpark

Most popular extensions: .mdoc, .md

Ugh, this project picked two file extensions already in-use by existing markup languages (Roff and Markdown). Assuming that Markdoc achieves sufficient usage on GitHub, adding support for it is going to be a pain-in-the-arse… 😞

Alhadis avatar Feb 27 '24 19:02 Alhadis

If I understand correctly, Markdoc boils down to Markdown plus an extended syntax like {% this %}? If so I imagine a lot of repositories that use Markdown with other template tools that use this Jinja-like syntax can get misidentified as Markdoc very easily.

I noticed that HTML+Django (alias of Jinja) does not have the .html extension, even though it's commonly used (see nearly every Django project). I assume this is intentional since the syntax would be too similar to tell them apart. Perhaps Markdoc should be treated similarly, and not have the .md extension registered for it?

spenserblack avatar Mar 08 '24 20:03 spenserblack

This is why every language should specify itself at the top of the doc like XHTML xD

jasikpark avatar Mar 11 '24 20:03 jasikpark