Concatenating Text objects with strikethrough

Originator:nathan.chiu
Number:rdar://FB8884004 Date Originated:Nov 5, 2020
Status:Open Resolved:Open
Product:SwiftUI Framework Product Version:
Classification:Incorrect/Unexpected Behavior Reproducible:
 
Please describe the issue:
When two Text objects are concatenated, strikethrough formatting will not persist if it is applied to the first Text object.

Please list the steps you took to reproduce the issue:
1. open the attached playground:

   import SwiftUI
   
   Text("foo").bold() + Text("bar")
   Text("foo") + Text("bar").bold()
   
   Text("foo").italic() + Text("bar")
   Text("foo") + Text("bar").italic()
   
   Text("foo").strikethrough() + Text("bar") // `foobar`
   Text("foo") + Text("bar").strikethrough() // `foo~bar~`
   Text("foo").strikethrough() + Text("bar").strikethrough() // `~foobar~`
   
2. observe the output of each line

What did you expect to happen?
line 9 would result in ~foo~bar

What actually happened?
line 9 results in foobar (no strikethrough)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!