Commit 61a636d8 authored by Nicolas Lenz's avatar Nicolas Lenz
Browse files

Fix #3: Implement strikethrough style.

parent 6c14bb8b
......@@ -24,7 +24,8 @@ styles = [
("double", T.map toDouble),
("cc", mockCC),
("b", mockB),
("square", mockSquare)]
("square", mockSquare),
("strike", strikethrough)]
-- |Transforms a String into uppercase where the corresponding list is True. For False the String isn't changed.
toUpperBy :: [Bool] -> T.Text -> T.Text
......@@ -71,3 +72,9 @@ mockB = T.replace "b" "🅱️" . T.replace "B" "🅱️"
-- |Makes a square from a string.
mockSquare :: Text -> Text
mockSquare text = T.concat [T.intersperse ' ' text, "\n", T.intercalate "\n" (T.chunksOf 1 text)]
-- |Uses Unicode U+0336 to let a text look struck through.
strikethrough :: Text -> Text
strikethrough text
| text == T.empty = T.empty
| otherwise = T.intersperse '\822' text `T.append` "\822"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment