File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
Sources/DiffableTextStylesXPattern Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,19 @@ extension PatternTextStyle {
7575 characters. append ( contentsOf: queue)
7676 } done: {
7777 characters, queue, contents in
78- visible ? characters += queue : ( )
79- guard !contents. isEmpty else { return }
80- characters. append ( " | " )
81- characters. append ( contentsOf: contents)
78+ //=----------------------------------=
79+ // MARK: Pattern
80+ //=----------------------------------=
81+ if visible {
82+ characters. append ( contentsOf: queue)
83+ }
84+ //=----------------------------------=
85+ // MARK: Mismatches
86+ //=----------------------------------=
87+ if !contents. isEmpty {
88+ characters. append ( " | " )
89+ characters. append ( contentsOf: contents)
90+ }
8291 }
8392 }
8493}
@@ -106,7 +115,12 @@ extension PatternTextStyle {
106115 commit. snapshot. anchor ( )
107116 } done: {
108117 commit, queue, _ in
109- visible ? commit. snapshot += Snapshot ( queue, as: . phantom) : ( )
118+ //=----------------------------------=
119+ // MARK: Pattern
120+ //=----------------------------------=
121+ if visible {
122+ commit. snapshot. append ( contentsOf: Snapshot ( queue, as: . phantom) )
123+ }
110124 }
111125 }
112126}
You can’t perform that action at this time.
0 commit comments