tessl install tessl/npm-marked@17.0.0A markdown parser built for speed
Common issues and solutions.
Problem: Links inside links are not parsed.
Explanation: Per markdown spec, links cannot contain other links.
Solution: Use different markdown structure or custom extension.
Problem: Single newlines don't create <br> tags.
Solution: Enable breaks option or use two spaces before newline.
marked.setOptions({ gfm: true, breaks: true });Problem: HTML in markdown is escaped or not showing.
Solution: Marked passes HTML through by default. To sanitize, use DOMPurify.
Problem: Pipe-delimited tables not parsing.
Solution: Ensure gfm: true is enabled.
marked.setOptions({ gfm: true });Problem: Custom extension not being applied.
Solution: Ensure tokenizer returns token object (not null/false) and includes raw property.
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 });Problem: Parsing is slow for large documents.
Solutions: