as I was extracting the iOS specific text stuff that doesn't work on macOS, I found there's no need to make the Marklight struct a container of global values. The MarklightTextStorage duplicates all these settings again and acts as a façade.
To prepare user-cusomizable theming, I was thinking about moving all the visual settings (fonts, colors, ...) into a MarklightStyle struct that the text storage consumes. It then passes the settings on to the regex processor. This will get rid of global library state and make the processor a pure function, which may turn out to make testing easier.
Hey,
as I was extracting the iOS specific text stuff that doesn't work on macOS, I found there's no need to make the
Marklight
struct a container of global values. TheMarklightTextStorage
duplicates all these settings again and acts as a façade.To prepare user-cusomizable theming, I was thinking about moving all the visual settings (fonts, colors, ...) into a
MarklightStyle
struct that the text storage consumes. It then passes the settings on to the regex processor. This will get rid of global library state and make the processor a pure function, which may turn out to make testing easier.What do you think @macteo?