parent
a68e072bac
commit
75695b1817
1 changed files with 6 additions and 4 deletions
|
@ -370,8 +370,6 @@ preformatted = try $ do
|
|||
manyTill anyChar (htmlTag (~== TagClose "nowiki")))
|
||||
let inline' = whitespace' <|> endline' <|> nowiki'
|
||||
<|> (try $ notFollowedBy newline *> inline)
|
||||
let strToCode (Str s) = Code ("",[],[]) s
|
||||
strToCode x = x
|
||||
contents <- mconcat <$> many1 inline'
|
||||
let spacesStr (Str xs) = all isSpace xs
|
||||
spacesStr _ = False
|
||||
|
@ -379,6 +377,10 @@ preformatted = try $ do
|
|||
then return mempty
|
||||
else return $ B.para $ walk strToCode contents
|
||||
|
||||
strToCode :: Inline -> Inline
|
||||
strToCode (Str s) = Code ("",[],[]) s
|
||||
strToCode x = x
|
||||
|
||||
header :: MWParser Blocks
|
||||
header = try $ do
|
||||
guardColumnOne
|
||||
|
@ -542,8 +544,8 @@ inlineTag = do
|
|||
TagOpen "del" _ -> B.strikeout <$> inlinesInTags "del"
|
||||
TagOpen "sub" _ -> B.subscript <$> inlinesInTags "sub"
|
||||
TagOpen "sup" _ -> B.superscript <$> inlinesInTags "sup"
|
||||
TagOpen "code" _ -> B.code <$> charsInTags "code"
|
||||
TagOpen "tt" _ -> B.code <$> charsInTags "tt"
|
||||
TagOpen "code" _ -> walk strToCode <$> inlinesInTags "code"
|
||||
TagOpen "tt" _ -> walk strToCode <$> inlinesInTags "tt"
|
||||
TagOpen "hask" _ -> B.codeWith ("",["haskell"],[]) <$> charsInTags "hask"
|
||||
_ -> B.rawInline "html" . snd <$> htmlTag (~== tag)
|
||||
|
||||
|
|
Loading…
Reference in a new issue