MARKDOWN2(1)

🌸 markdown2 β€” the manual page, but make it cute ✨

okay bestie, welcome to the markdown2 man page πŸ’– this is from User Commands, it lives in section 1 of the manual (that's the (1) bestie, that's the whole vibe), and it is literally the command that turns your markdown into HTML. no cap.


πŸŽ€ NAME πŸŽ€

markdown2 β€” the Command to convert a markdown file to HTML. that's it. that's the job. she does one thing and she ATE πŸ’…


✨ SYNOPSIS ✨

markdown2 [PATHS...]

give her some PATHS... and she'll go off. periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. markdown2 is a fast and complete Python implementation of Markdown β€” aka a text-to-HTML conversion tool for web writers. she's giving main character energy, she's thorough, she's quick, she's iconic. 🌈

Now the tea β˜• β€” here are the supported extra syntax options. (peep the -x|--extras option down in OPTIONS, and peep <https://github.com/trentm/python-markdown2/wiki/Extras> for the full details, iykyk):

  • code-friendly β€” Disable _ and __ for em and strong. bye bye italics, we're being literal now πŸ™ˆ
  • cuddled-lists β€” Allow lists to be cuddled to the preceding paragraph. so cozy. so close. let them snuggle 🫢
  • fenced-code-blocks β€” Allows a code block to not have to be indented by fencing it with '```' on a line before and after. Based on <http://github.github.com/github-flavored-markdown/> with support for syntax highlighting. no indentation required, she's ✨flexible✨
  • footnotes β€” Support footnotes as in use on daringfireball.net and implemented in other Markdown processors (tho not in Markdown.pl v1.0.1). the little numbers at the bottom?? yes queen πŸ‘‘
  • header-ids β€” Adds "id" attributes to headers. The id value is a slug of the header text. every header gets a lil name tag 🏷️
  • highlightjs-lang β€” Allows specifying the language which used for syntax highlighting when using fenced-code-blocks and highlightjs. tell her which language so she can glow it up ⭐
  • html-classes β€” Takes a dict mapping html tag names (lowercase) to a string to use for a "class" tag attribute. Currently only supports "img", "table", "pre" and "code" tags. Add an issue if you require this for other tags. just those four bestie, don't come for her πŸ’€
  • link-patterns β€” Auto-link given regex patterns in text (e.g. bug number references, revision number references). regex girlies rise up πŸ”₯
  • markdown-in-html β€” Allow the use of `markdown="1"` in a block HTML tag to have markdown processing be done on its contents. Similar to <http://michelf.com/projects/php-markdown/extra/#markdown-attr> but with some limitations. (yes, limitations, noted, read the wiki babe 😭)
  • metadata β€” Extract metadata from a leading '---'-fenced block. See <https://github.com/trentm/python-markdown2/issues/77> for details. front matter stans, this one's for you πŸŽ€
  • nofollow β€” Add `rel="nofollow"` to add <a> tags with an href. See <http://en.wikipedia.org/wiki/Nofollow>. SEO girlies, she's got you 🧚
  • numbering β€” Support of generic counters. Non standard extension to allow sequential numbering of figures, tables, equations, exhibits etc. she counts things now. non standard, but she's doing it anyway πŸ’œ
  • pyshell β€” Treats unindented Python interactive shell sessions as <code> blocks. >>> girlies we see you 🐍
  • smarty-pants β€” Replaces ' and " with curly quotation marks or curly apostrophes. Replaces --, ---, ..., and . . . with en dashes, em dashes, and ellipses. she's making your punctuation FANCY, no cap ✨
  • spoiler β€” A special kind of blockquote commonly hidden behind a click on SO. Syntax per <http://meta.stackexchange.com/a/72878>. click to reveal, the drama of it all πŸ™ˆ
  • strike β€” text inside of double tilde is ~~strikethrough~~. striking it out like a text message you almost sent πŸ’€
  • tag-friendly β€” Requires atx style headers to have a space between the # and the header text. Useful for applications that require twitter style tags to pass through the parser. space it out bestie, the #hashtags need to survive 🌸
  • tables β€” Tables using the same format as GFM <https://help.github.com/articles/github-flavored-markdown#tables> and PHP-Markdown Extra <https://michelf.ca/projects/php-markdown/extra/#table>. tables!! the people's format!! πŸ“
  • toc β€” The returned HTML string gets a new "toc_html" attribute which is a Table of Contents for the document. (experimental) β€” she's experimental, she's growing, be nice πŸ¦‹
  • use-file-vars β€” Look for an Emacs-style markdown-extras file variable to turn on Extras. emacs besties, she remembered you 🫢
  • wiki-tables β€” Google Code Wiki-style tables. See <http://code.google.com/p/support/wiki/WikiSyntax#Tables>. another table format because one is never enough πŸ‘‘
  • xml β€” Passes one-liner processing instructions and namespaced XML tags. xml girlies, she sees you, she passes you through πŸ’…

πŸ’… OPTIONS πŸ’…

one bullet per flag, no skipping, we do not leave anyone out in this group chat πŸ’–

  • --version β€” show program's version number and exit. know your queen's version, it's the bare minimum ✨
  • -h, --help β€” show this help message and exit. lost? confused? just ask her πŸŽ€
  • -v, --verbose β€” more verbose output. she will tell you EVERYTHING. every detail. she's a yapper and we love her for it 😭
  • --encoding=ENCODING β€” specify encoding of text content. tell her what encoding your text is in, she's not a mind reader 🧚
  • --html4tags β€” use HTML 4 style for empty element tags. retro. vintage. nostalgic. HTML 4 era πŸ’œ
  • -s MODE, --safe=MODE β€” sanitize literal HTML: 'escape' escapes HTML meta chars, 'replace' replaces with an [HTML_REMOVED] note. safety first bestie, especially if the HTML is sketchy 🚨
  • -x EXTRAS, --extras=EXTRAS β€” Turn on specific extra features (not part of the core Markdown spec). See above. πŸ‘† that big list up there? this is how you turn them on
  • --use-file-vars=USE_FILE_VARS β€” Look for and use Emacs-style 'markdown-extras' file var to turn on extras. See <https://github.com/trentm/pythonmarkdown2/wiki/Extras> πŸ“–
  • --link-patterns-file=LINK_PATTERNS_FILE β€” path to a link pattern file. point her at the file, she does the rest πŸ”—
  • --self-test β€” run internal self-tests (some doctests). she checks herself before she wrecks herself πŸ’…
  • --compare β€” run against Markdown.pl as well (for testing). a little friendly competition, for science πŸ†

⚠️ heads up bestie: a couple of these extras are marked as non standard (numbering), experimental (toc), or come with stated limitations (markdown-in-html). that's straight from the source, don't shoot the messenger πŸ™ˆ

🌈 SEE ALSO 🌈

okay so she didn't put a formal SEE ALSO section in here, but the links she dropped are basically it β€” go read the Extras wiki at <https://github.com/trentm/python-markdown2/wiki/Extras> for the full lore, and check the markdown-in-html and tables links up above for the deep cuts. iykyk πŸ“š


🫢 the sign-off 🫢

this whole thing is markdown2 2.3.7, dated December 2018 β€” that's the source and the version and the date, all wrapped up in a little bow πŸŽ€ she's been serving since 2018 and she's still that girl. slay, periodt, no cap πŸ’–βœ¨