zesterer / ariadne

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

Add Source::with_line_offset function #7

Open olson-dan opened 2 years ago

olson-dan commented 2 years ago

Hi,

Here's the PR discussed here: https://github.com/zesterer/ariadne/issues/6

I've cleaned it up a little to remove the auto-formatting and ensure that Source::with_line_offset uses AsRef<str>.