campoy / embedmd

embedmd: embed code into markdown and keep everything in sync
Apache License 2.0
767 stars 62 forks source link

Use a native Go package for diffing #43

Closed broady closed 7 years ago

broady commented 7 years ago

Updates #42.

broady commented 7 years ago

cc @shurcooL

dmitshur commented 7 years ago

That's pretty awesome, I didn't know (or forgot) about that a pure Go package existed for this functionality! 🎉

The minor differences in the test data for diffs are a bit concerning, but hopefully it's not a big deal in practice.

broady commented 7 years ago

It's the only library I could find that does a unified diff.

Yeah, I don't know about the small differences - especially the line numbers in the diff headers.

My guess is people will use this in tests, so you just want some reasonable output.