CodeRigor

COURSE / REAL PRACTICE

Publish a page from Markdown

Build a small documented Markdown parser and publish a styled single HTML page with explicit escaping, safe links and useful diagnostics.

Lessons & exercises7 authored lessons3 units
Start with the first lesson.

Read the explanation and diagrams, then work through the practice. Your browser profile supplies your saved progress.

What you’ll work toward

Generate a complete responsive HTML page from an explicit Markdown subset, inspect its parsed structure and repeat the build with stable bytes and a SHA-256 digest. The standard-library lab includes source, template, fixtures, tests and an owned output directory.

Read an explanation, inspect the diagrams and work through the available checks, debugging exercises and builds. Feedback and prerequisite links guide the next step.

Before you start

This course builds on these skills:

Individual lessons can add prerequisites. Your lesson progress shows your actual readiness.

A look inside the first lesson

Define the language before writing the parser

Python
source = "# Title\r\n\r\nParagraph\rnext line\n"
normalized = source.replace("\r\n","\n").replace("\r","\n")
print(repr(normalized))
print("same line count", normalized.count("\n"))

Your lesson sequence

Follow the same units and lessons in either view. Prerequisite links and your practice progress stay with each lesson.

UNIT 013 lessons A small language with explicit boundaries
  1. LESSON 01.01

    Define the language before writing the parser

    Document the supported subset, normalize line endings and retain one-based source locations.

    Open lesson
  2. LESSON 01.02

    Split blocks without losing code or locations

    Recognize blank-separated headings, paragraphs, flat lists and fenced code while preserving source positions.

    Open lesson
  3. LESSON 01.03

    Parse inline structure before generating HTML

    Scan one line into text, code, emphasis and plain-label link tokens with exact source offsets.

    Open lesson
UNIT 023 lessons Safe output and useful failures
  1. LESSON 02.01

    Escape text and authorize link destinations

    Render only controlled tags, escape text/attribute contexts separately and reject unsafe or ambiguous links.

    Open lesson
  2. LESSON 02.02

    Fill a trusted template in one pass

    Render known block kinds, preserve fenced code and substitute escaped title plus controlled body fragments without reinterpreting values.

    Open lesson
  3. LESSON 02.03

    Report unsupported syntax at its source location

    Compose the parser and renderer, distinguish source errors from configuration/programmer failures and return no partial page on failure.

    Open lesson
UNIT 031 lesson A repeatable one-page publisher
  1. LESSON 03.01

    Build and inspect a styled page repeatably

    Measure UTF-8 bytes, fingerprint successful output and use an owned atomic-write CLI to publish the complete sample.

    Open lesson