<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Parsing on Wilhelm Maritz</title><link>https://wjmaritz.dev/tags/parsing/</link><description>Recent content in Parsing on Wilhelm Maritz</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Wed, 05 Mar 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://wjmaritz.dev/tags/parsing/index.xml" rel="self" type="application/rss+xml"/><item><title>Parsing Markdown by alternating on odd and even</title><link>https://wjmaritz.dev/posts/markdown-parser-odd-even/</link><pubDate>Wed, 05 Mar 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/markdown-parser-odd-even/</guid><description>&lt;p>I worked through &lt;a href="https://www.boot.dev/courses/build-static-site-generator-python" target="_blank" rel="noopener">boot.dev&amp;rsquo;s Build a Static Site Generator&lt;/a>, a guided project that has you write the thing that turns &lt;code>**bold**&lt;/code> into &lt;code>&amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt;&lt;/code>. The architecture is the course&amp;rsquo;s: a &lt;code>TextNode&lt;/code> type for chunks of formatted text, an &lt;code>HTMLNode&lt;/code> tree to render, and separate passes for block-level and inline parsing.&lt;/p>
&lt;p>This is a write-up of the piece I found most elegant, not something I invented. The inline parser is a genuinely neat idea, and it took me a while to see &lt;em>why&lt;/em> it works, so it seemed worth explaining properly.&lt;/p></description></item></channel></rss>