new less ugly makeQuotes.isDelim
This commit is contained in:
parent
b1ef3fc82d
commit
1098cbdc1b
1 changed files with 2 additions and 1 deletions
|
@ -72,7 +72,8 @@ makeQuotes para@(Para b) = fromMaybe para $ do
|
||||||
inner <- split b
|
inner <- split b
|
||||||
return (BlockQuote [Para inner])
|
return (BlockQuote [Para inner])
|
||||||
where
|
where
|
||||||
isDelim str = str == "\"\"\"" || str == "““”" -- lol
|
isDelim str = Text.length str == 3 && Text.all isQuote str
|
||||||
|
isQuote c = c == '"' || c == '“' || c == '”'
|
||||||
|
|
||||||
split (Str begin:SoftBreak:rest) = guard (isDelim begin) *> checkEnd rest
|
split (Str begin:SoftBreak:rest) = guard (isDelim begin) *> checkEnd rest
|
||||||
split _ = empty
|
split _ = empty
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue