File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ class EventTransformer {
1616 for rule in rules where event. title. label. range (
1717 of: rule. regex, options: . regularExpression
1818 ) != nil {
19- return event |> ( Event . titleLens * Title. iconLens) *~ rule. icon
19+ let withIcon = event
20+ |> ( Event . titleLens * Title. iconLens) *~ rule. icon
21+ let withFull = withIcon
22+ |> ( Event . titleLens * Title. fullLens) *~ " \( rule. icon) \( event. title. full) "
23+ return withFull
2024 }
2125 return event
2226 }
Original file line number Diff line number Diff line change @@ -89,4 +89,13 @@ extension Title {
8989 icon: icon
9090 ) }
9191 )
92+
93+ static let fullLens = Lens < Title , String > (
94+ get: { title in title. full } ,
95+ set: { full, title in Title (
96+ full: full,
97+ label: title. label,
98+ icon: title. icon
99+ ) }
100+ )
92101}
You can’t perform that action at this time.
0 commit comments