From 3d853c0fed0dc4e8fa8f9c3fc479d36afc263f67 Mon Sep 17 00:00:00 2001 From: glushchenko Date: Wed, 25 Sep 2024 21:18:01 +0300 Subject: [PATCH] #1759 --- FSNotes/Helpers/NotesTextProcessor.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FSNotes/Helpers/NotesTextProcessor.swift b/FSNotes/Helpers/NotesTextProcessor.swift index 8fd45b6e1..47c9b51f0 100644 --- a/FSNotes/Helpers/NotesTextProcessor.swift +++ b/FSNotes/Helpers/NotesTextProcessor.swift @@ -895,6 +895,7 @@ public class NotesTextProcessor { NotesTextProcessor.italicRegex.matches(string, range: paragraphRange) { (result) -> Void in guard let range = result?.range else { return } attributedString.addAttribute(.font, value: italicFont, range: range) + attributedString.fixAttributes(in: range) let preRange = NSMakeRange(range.location, 1) attributedString.addAttribute(.foregroundColor, value: NotesTextProcessor.syntaxColor, range: preRange) @@ -906,6 +907,7 @@ public class NotesTextProcessor { NotesTextProcessor.boldRegex.matches(string, range: paragraphRange) { (result) -> Void in guard let range = result?.range else { return } attributedString.addAttribute(.font, value: boldFont, range: range) + attributedString.fixAttributes(in: range) let preRange = NSMakeRange(range.location, 2) attributedString.addAttribute(.foregroundColor, value: NotesTextProcessor.syntaxColor, range: preRange)