johnyob / grace

A fancy diagnostics library that allows your compilers to exit with grace
MIT License
71 stars 2 forks source link

🔮 Refactor: Compute line margin in `Snippet` #5

Closed johnyob closed 5 months ago

johnyob commented 10 months ago

Context

Currently we compute the line margin in a rather hacky way in Ansi.ml by reconstructing the line content from the line.segments. Instead we should compute the line (and block) margin in Snippet.

Future work from this could include margin contraction.