style: restore Conjure colors in notes

This commit is contained in:
Valdemar Lorenzen
2026-10-19 16:06:28 +02:00
parent 999d44226d
commit adac0723a1
4 changed files with 22 additions and 25 deletions
@@ -1301,6 +1301,9 @@ func notesFormattingPreservesAttachmentsMarkdownSelectionAndUndo() throws {
button.performClick(nil)
}
window.makeFirstResponder(editor)
let undo = try #require(editor.undoManager)
undo.groupsByEvent = false
undo.beginUndoGrouping()
editor.insertText("🦊 first\nsecond\nuntouched", replacementRange: editor.selectedRange())
let selection = NSRange(location: 0, length: "🦊 first\nsecond\n".utf16.count)
editor.setSelectedRange(selection)
@@ -1335,11 +1338,11 @@ func notesFormattingPreservesAttachmentsMarkdownSelectionAndUndo() throws {
editor.setSelectedRange(NSRange(location: 0, length: editor.string.utf16.count))
let before = editor.markdownString
editor.breakUndoCoalescing()
undo.endUndoGrouping()
editor.undoManager?.removeAllActions()
try click("Quote")
try #require(editor.markdownString == "> 🦊 first\n> second\n> untouched\u{fffc}")
#expect(editor.markdownContents.attribute(.attachment, at: editor.markdownContents.length - 1, effectiveRange: nil) is NSTextAttachment)
editor.undoManager?.endUndoGrouping()
editor.undoManager?.undo()
try #require(editor.markdownString == before)
#expect(editor.markdownContents.attribute(.attachment, at: editor.markdownContents.length - 1, effectiveRange: nil) is NSTextAttachment)