Pug → HTML compiles the static subset in the Worker without a JavaScript runtime: doctype, tags, #id and .class shorthands, (attributes) with quoted strings, numbers and booleans, tag: tag block expansion, tag. block text, | piped text, // and //- comments, tag/ self-closing, #[tag] inline tags and literal #{} interpolation. Unbuffered code, control flow, mixins, includes and expression attributes are reported by line instead of being guessed. HTML → Pug rebuilds id/class shorthands, keeps script/style/pre/textarea as block text and folds inline formatting into #[] interpolation. Everything runs locally.