annotate-snippets-rs icon indicating copy to clipboard operation
annotate-snippets-rs copied to clipboard

Decouple `FormatOptions` from `Snippet`

Open epage opened this issue 4 years ago • 3 comments

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.

epage avatar Nov 23 '20 16:11 epage

I can work around this by mutating the fields but in general, it doesn't seem to be separating concerns appropriately.

epage avatar Nov 23 '20 17:11 epage

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?

zbraniecki avatar Nov 23 '20 17:11 zbraniecki

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.

epage avatar Nov 23 '20 17:11 epage

Closed via #67

epage avatar Dec 05 '23 19:12 epage