johnyob / grace

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

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

Closed johnyob closed 4 months ago

johnyob commented 9 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.