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'm wondering what the best way is for dealing with with nested tags. for instance, if i have <strong><em>Hello!</em></strong>, I'd like for "Hello!" to be both bolded and italicized, but the most deeply nested tag wins the day with my current approach (i.e. the hello example is italicized but not bolded). This is what I have:
letbaseStyle=Style{...}letboldStyle= baseStyle.byAdding{
$0.traitVariants = $0.traitVariants?.union(.bold)??.bold;
// have also tried $0.traitVariants = .bold, same effect
}letitalicStyle= baseStyle.byAdding{
$0.traitVariants = $0.traitVariants?.union(.italic)??.italic
// have also tried $0.traitVariants = .italic, same effect
}letxmlStyle=SyleXML(base: baseStyle,["strong": strongStyle,"em": italicStyle])
I'm a bit of an iOS noob; any direction here is much appreciated.
Thanks again!
The text was updated successfully, but these errors were encountered:
Hello!
<strong><em>Hello!</em></strong>
, I'd like for "Hello!" to be both bolded and italicized, but the most deeply nested tag wins the day with my current approach (i.e. the hello example is italicized but not bolded). This is what I have:I'm a bit of an iOS noob; any direction here is much appreciated.
Thanks again!
The text was updated successfully, but these errors were encountered: