Overview of Attribute Fixing in NSTextStorage
NSTextStorage provides attribute fixing of user-entered text, via NSMutableAttributedString.fixAttributes(in:). Attribute fixing… NSMutableAttributedString.fixAttributes(in:) always work on full paragraph ranges. It extends the passed-in range as needed “to cover the last paragraph partially contained”.