Skip to main content

Creating a compiler-based Markdown parser in TypeScript - Part 1

· 6 min read

Motivation

In my previous article, I wrote about creating a simple Markdown parser in TypeScript. That parser, based on regular expressions, is simple to understand but has limitations in supporting Markdown syntax and generating HTML output. In this article, we'll explore an alternative approach to creating a Markdown parser using a compiler-style method. This three-part series begins with an exploration of tokenization. The implementation and ideas are adapted from this blog post from Federico Ramirez - Beezwax, which is well-written and easy to understand.

The purpose of this article and series is to document how I interpret the tutorials and note the key points I have learned. Unlike the Ruby language used in the tutorial, I'm using TypeScript. This may be helpful for those more familiar with TypeScript.

Useful Computer Science Modules

· 3 min read

Motivation

During my work as a software engineer, I've discovered that certain computer science modules have remained invaluable. These modules have played a significant role in both grasping new concepts and tackling everyday problems at work. Here are a few that frequently come to mind.