nextjournal / markdown

A cross-platform clojure/script parser for Markdown
ISC License
38 stars 4 forks source link

Add token span :map for fenced code blocks #10

Closed gaudecker closed 1 year ago

gaudecker commented 1 year ago

Adds :map from the tokenizer to final output. This is useful for referencing specific code blocks from the input.

My use-case for this is for printing pretty errors when evaluating code blocks from within Markdown.

zampino commented 1 year ago

@gaudecker thanks for closing this. We didn't have the need for mapping the input source node-wise so far. I guess you can add your implementation of apply-token directly in your project if needed.

gaudecker commented 1 year ago

Indeed. I'm new to Clojure and didn't think to override the definition locally.