zesterer / ariadne

A fancy diagnostics & error reporting crate
https://crates.io/crates/ariadne
MIT License
1.79k stars 78 forks source link

Example in README does not render properly #49

Closed marcospb19 closed 2 years ago

marcospb19 commented 2 years ago

Hey, I was trying to get started with Ariadne and grabbed an example from the README, but it does not render as expected:

What I got:

image

What README shows:

Ariadne supports arbitrary multi-line spans

Tested with 0.1.5 and 0.1.3.

I was about to open a PR to fix this, the spans are a bit behind for the example in README and examples/sample.rs, however, I just wanted to confirm, can you reproduce this?

EDIT: updated image.

marcospb19 commented 2 years ago

Managed to fix by updating the span ranges:

image

PR welcome?

marcospb19 commented 2 years ago

Oops, you used tabs in sample.tao, my text editor converted it to spaces, my bad xD.