wooorm / markdown-rs

CommonMark compliant markdown parser in Rust with ASTs and extensions
https://docs.rs/markdown/1.0.0-alpha.18/markdown/
MIT License
836 stars 41 forks source link

Add error message struct #114

Closed wooorm closed 2 months ago

wooorm commented 2 months ago

This is like what wooorm/mdxjs-rs#43 achieves but is implemented in the markdown parser, so that all errors can be the same struct, instead of only some.

It also follows vfile-message, the JavaScript counterpart, so that errors are similar in JavaScript and Rust.

Closes GH-108. Closes: wooorm/mdxjs-rs#42. Closes: wooorm/mdxjs-rs#43.

/cc @kdy1: this stores clean positional info on errors, is this what you want?

kdy1 commented 2 months ago

Yeap, and it looks far better than my PR. Huge thanks!