trim whitespace around the svg. lol
This commit is contained in:
parent
a7bbfd5035
commit
e8d46973fa
1 changed files with 5 additions and 3 deletions
|
@ -13,6 +13,7 @@ import Data.Text (Text)
|
|||
import qualified Data.Text as Text
|
||||
import qualified Data.Text.Lazy as Lazy
|
||||
import qualified Laantas
|
||||
import Data.Char (isSpace)
|
||||
|
||||
|
||||
data Item =
|
||||
|
@ -86,9 +87,10 @@ makeItem :: Item -> Inline
|
|||
makeItem (Item {..}) =
|
||||
let env = Laantas.E {..}
|
||||
words = Laantas.split text in
|
||||
RawInline "html" $ Lazy.toStrict $ Laantas.prettyText $
|
||||
Laantas.doGlyphsNoDoctype words env `Laantas.with`
|
||||
[Laantas.Class_ Laantas.<<- "scr"]
|
||||
RawInline "html" $
|
||||
Lazy.toStrict $ Lazy.dropAround isSpace $ Laantas.prettyText $
|
||||
Laantas.doGlyphsNoDoctype words env `Laantas.with`
|
||||
[Laantas.Class_ Laantas.<<- "scr"]
|
||||
|
||||
notPunc :: Char -> Bool
|
||||
notPunc c = c `notElem` ("{}·" :: String)
|
||||
|
|
Loading…
Add table
Reference in a new issue