title: Marrowmark-to-HTML parser created: 2025-10-26 === Enter marrowmark in the upper textarea and click “Parse” to convert it to raw HTML in the lower textarea and render it at the bottom (on narrower screens) or on the right (on wider screens). Read on for more info, and click “Reset” to revert to this info (be careful; you can't undo the reset). This parser is just a tool for demonstrating how marrowmark is written and how it converts to HTML. The output should be functionally identical to that of Marrow's own parser, but there may be small differences such as in the amount of whitespace at the end of the parsed text. ! What's Marrow? Marrow is a perl-based command line tool for turning a set of plaintext notes into a single HTML notebook that can be opened in a web browser and even uploaded online. @ https://codeberg.org/cdvr/marrow source for Marrow, the command-line HTML notebook builder app, on codeberg ! What's Marrowmark? Marrowmark is the lightweight markup language used in Marrow notes. @ https://codeberg.org/cdvr/marrow/src/branch/main/marrowmark.md See the Marrowmark guide for more info The language is deliberately simple, only supporting a handful of block-level elements: * one level of heading (beneath the note title, which is included in note metadata) * regular paragraphs * horizontal rules * blockquotes * unordered lists * ordered lists * description (key–value) lists * link lists Think of it as a smaller, simpler version of markdown. Like markdown, it supports HTML as well, but only inline HTML is valid under all circumstances. Block-level HTML is valid in certain marrowmark blocks (e.g. ordered or unordered list items). This parser also supports Marrow metadata blocks, which will be parsed to a header. ! Controls : Browse : The “Browse…” button lets you open a .mrrw or .txt file in the input area. : Parse : The "Parse" button parses the gemtext into HTML, then displays the raw code in the bottom, read-only, textarea, and renders it after that. : Reset : The "Reset" button resets the parser, so it shows this default gemtext and its raw and rendered HTML. ! Under the hood The parser: # identifies the metadata block, if there is one, and uses it to build a header # divides the remaining input into lines # trims whitespace at either end # identifies which marrowmark block the line belongs to and processes it accordingly While the parser script would probably be much shorter if it used regex replaceAll to find all instances of each block and replace them at once instead of iterating over each line one by one, I wanted to follow what happens in the original perl script as closely as possible. Parse Reset