Skip to content

Commit

Permalink
WIP: Rewrite cleanText to strip zero width spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
axman6 committed May 1, 2024
1 parent 08a7f94 commit b12fbd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Client/Image/Message.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ cleanChar x
| otherwise = x

cleanText :: Text -> Text
cleanText = Text.map cleanChar
cleanText = Text.concatMap f where
f c | c == '\8203' = Text.empty -- remove the zero width space the haskell bridge uses
f c = Text.singleton (cleanChar c)

ctxt :: Text -> Image'
ctxt = text' defAttr . cleanText
Expand Down

0 comments on commit b12fbd3

Please sign in to comment.