cmark-gfm(1)

πŸ“¦
version 0.29.0.gfm.13 Β· 2 versions
, in arch rolling, debian bookworm, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble

πŸ’– cmark-gfm β€” the group-chat guide πŸ’–

okay so bestie, you found the cmark-gfm page in the General Commands Manual and I'm literally so glad you're here 🫢 this is the tool that takes your Markdown and turns it into fancy output, and honestly? it's giving main character energy. let's get into it.


✨ NAME ✨

cmark β€” converts CommonMark formatted text (with those GitHub Flavored Markdown extensions, iykyk) into HTML πŸ’…


🌸 SYNOPSIS 🌸

cmark-gfm [options] file*

πŸ¦‹ DESCRIPTION πŸ¦‹

cmark-gfm takes Markdown formatted plain text and converts it to HTML, groff man, CommonMark XML, LaTeX, or CommonMark, following the conventions laid out in the CommonMark spec ✨

It reads input from stdin or from the files you name β€” and bestie, it concatenates their contents, so yes, multiple files are a vibe πŸŽ€ β€” and it writes the output to stdout.


πŸ’… OPTIONS πŸ’…

okay this is the part you actually came for, no cap πŸ‘‘

  • --to, -t FORMAT β€” tell it what you want out the other side: html, man, xml, latex, or commonmark. pick your fighter ⭐
  • --width WIDTH β€” set a column width for wrapping the output 🧚 and for no wrapping at all, use the value 0 (that's the default, she's lowkey chill by nature). heads up though: this option currently only affects the commonmark, latex, and man renderers πŸ’œ
  • --hardbreaks β€” renders soft breaks (those sneaky newlines inside paragraphs in your CommonMark source) as hard line breaks in the target format πŸ”₯ but if you use this, hard wrapping is disabled for CommonMark output, regardless of whatever value you gave --width. she said pick a lane πŸ’€
  • --nobreaks β€” the opposite vibe: renders soft breaks as spaces ✨ and if you specify this one, hard wrapping is disabled for all output formats, regardless of the value given with --width. periodt 🌈
  • --sourcepos β€” include the source position attribute 🎯
  • --normalize β€” consolidate adjacent text nodes 🧹 (decluttering, we love to see it)
  • --extension, -e EXTENSION_NAME β€” specify an extension name to use πŸ¦‹
  • --list-extensions β€” list all the available extensions and then quit πŸ‘‹ (like a little menu, bestie)
  • --validate-utf8 β€” validate UTF-8, replacing illegal sequences with U+FFFD πŸ™ˆ
  • --smart β€” use smart punctuation πŸ’– straight double and single quotes get rendered as curly quotes, depending on their position. -- becomes an en-dash, --- becomes an em-dash, and ... becomes ellipses. tiny typography glow-up, obsessed πŸŽ€
  • --unsafe β€” render raw HTML and potentially dangerous URLs πŸ’€ (so: raw HTML is not replaced by a placeholder comment, and potentially dangerous URLs are not replaced by empty strings). dangerous URLs are those that begin with javascript:, vbscript:, file:, or data: (except for image/png, image/gif, image/jpeg, or image/webp mime types). like, she's literally called "unsafe", be mindful bestie 😭
  • --help β€” print usage information 🫢
  • --version β€” print version πŸ‘‘

πŸ‘‘ AUTHORS πŸ‘‘

John MacFarlane, Vicent Marti, Kārlis GaΕ†Δ£is, Nick Wellnhofer. icons, all of them πŸ’œ


🌈 SEE ALSO 🌈

CommonMark spec: http://spec.commonmark.org β€” go read it, it's giving homework but the fun kind πŸ“šβœ¨


quick vibe check before you go: --unsafe really does mean unsafe, and --hardbreaks / --nobreaks will override your --width wrapping. don't say I didn't warn you πŸ’…

and that's the whole page, bestie πŸ“ this one came from the LOCAL source, version-dated March 24, 2016 β€” yeah she's an older icon but she still ate πŸ’– mwah, go convert some markdown πŸ§šβ€β™€οΈβœ¨