or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/marked@17.0.x

docs

index.md
tile.json

tessl/npm-marked

tessl install tessl/npm-marked@17.0.0

A markdown parser built for speed

troubleshooting.mddocs/guides/

Troubleshooting Guide

Common issues and solutions.

Nested Links Not Working

Problem: Links inside links are not parsed.

Explanation: Per markdown spec, links cannot contain other links.

Solution: Use different markdown structure or custom extension.

Line Breaks Not Working

Problem: Single newlines don't create <br> tags.

Solution: Enable breaks option or use two spaces before newline.

marked.setOptions({ gfm: true, breaks: true });

HTML Not Rendering

Problem: HTML in markdown is escaped or not showing.

Solution: Marked passes HTML through by default. To sanitize, use DOMPurify.

Tables Not Working

Problem: Pipe-delimited tables not parsing.

Solution: Ensure gfm: true is enabled.

marked.setOptions({ gfm: true });

Extension Not Working

Problem: Custom extension not being applied.

Solution: Ensure tokenizer returns token object (not null/false) and includes raw property.

Async Not Working

Problem: Async walkTokens or hooks not executing.

Solution: Set async: true and use await.

marked.use({ async: true, walkTokens: async (token) => { await operation(); } });
const html = await marked.parse(markdown, { async: true });

Performance Issues

Problem: Parsing is slow for large documents.

Solutions:

  • Implement caching for repeated content
  • Profile extensions to find bottlenecks
  • Avoid expensive operations in walkTokens