style: restore Conjure colors in notes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user