annotate-snippets-rs
annotate-snippets-rs copied to clipboard
Decouple `FormatOptions` from `Snippet`
At the layer I want to be creating Snippets, I won't know whether colored formatting is appropriate or not. That seems like a concern for when converting into a DisplayList.
I can work around this by mutating the fields but in general, it doesn't seem to be separating concerns appropriately.
The way you construct the Snippet is flexible, and all that matters is that in the end you pass the right data to building Display List.
Maybe what you're reporting here is that FormatOptions are not a property of Snippet and instead should be separate and passed together into DisplayList builder?
Maybe what you're reporting here is that FormatOptions are not a property of Snippet and instead should be separate and passed together into DisplayList builder?
Yes, separating styling from semantic information.
Closed via #67