You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to patch SwiftyMarkdown into existing code. Styles needed to be compatible, strongly typed, consistent and readable. Here's my example of usage. Hope it helps someone.
Detail:
init() takes a list of markdown styles such as body and applies StyleProperty to them. func applyStyles copies the custom properties to the styles. enum StyleProperty provides the custom properties structure.
I needed to patch SwiftyMarkdown into existing code. Styles needed to be compatible, strongly typed, consistent and readable. Here's my example of usage. Hope it helps someone.
Detail:
init()
takes a list of markdown styles such asbody
and appliesStyleProperty
to them.func applyStyles
copies the custom properties to the styles.enum StyleProperty
provides the custom properties structure.Code:
Caveat: original code works fine but I've removed various code unneeded for the example.
The text was updated successfully, but these errors were encountered: