Preprocesses markdown content before rendering. Removes comments,
handles syntax highlighting markers, escapes code blocks, and fixes date formats.
Supports HTML comments (), highlighting syntax ( … ), and
configurable code block language escaping.
Properties
| Name | Type | Description |
|---|---|---|
comment |
preprocessor |
Remove HTML comments () |
commentCallouts |
preprocessor |
Remove comment callout blocks |
highlight |
preprocessor |
Convert highlight syntax text to |
escapeCodeBlock |
preprocessor |
Escape specified language code blocks |
fixDates |
preprocessor |
Convert date strings to Date objects |
escapeCodeBlocks |
option |
Array of languages to escape (e.g., [“html”, “xml”]) |
Examples
// In markdown, remove comments
// Highlight text
This text is <mark> highlighted </mark> with yellow background
// Code block escaping (configured in front matter)
escapeCodeBlocks: ["html"]
```html
<div>This block escapes backticks</div>
---
**Source:** `/Users/francisfontaine/Documents/GitHub/Standard/src/eleventy/preprocessor.js`