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 as Text
|
||||||
import qualified Data.Text.Lazy as Lazy
|
import qualified Data.Text.Lazy as Lazy
|
||||||
import qualified Laantas
|
import qualified Laantas
|
||||||
|
import Data.Char (isSpace)
|
||||||
|
|
||||||
|
|
||||||
data Item =
|
data Item =
|
||||||
|
@ -86,9 +87,10 @@ makeItem :: Item -> Inline
|
||||||
makeItem (Item {..}) =
|
makeItem (Item {..}) =
|
||||||
let env = Laantas.E {..}
|
let env = Laantas.E {..}
|
||||||
words = Laantas.split text in
|
words = Laantas.split text in
|
||||||
RawInline "html" $ Lazy.toStrict $ Laantas.prettyText $
|
RawInline "html" $
|
||||||
Laantas.doGlyphsNoDoctype words env `Laantas.with`
|
Lazy.toStrict $ Lazy.dropAround isSpace $ Laantas.prettyText $
|
||||||
[Laantas.Class_ Laantas.<<- "scr"]
|
Laantas.doGlyphsNoDoctype words env `Laantas.with`
|
||||||
|
[Laantas.Class_ Laantas.<<- "scr"]
|
||||||
|
|
||||||
notPunc :: Char -> Bool
|
notPunc :: Char -> Bool
|
||||||
notPunc c = c `notElem` ("{}·" :: String)
|
notPunc c = c `notElem` ("{}·" :: String)
|
||||||
|
|
Loading…
Add table
Reference in a new issue