pandoc-emphasize-code
pandoc-emphasize-code copied to clipboard
Does not compile with pandoc-types-1.20
Compilation fails with the following error:
[7 of 9] Compiling Text.Pandoc.Filter.EmphasizeCode.Latex
/private/var/folders/3b/9plp3gb959gcv_nyqg9j_k740000gn/T/stack70671/pandoc-emphasize-code-0.2.4/src/Text/Pandoc/Filter/EmphasizeCode/Latex.hs:48:8: error:
• Couldn't match type ‘[Char]’ with ‘Text’
Expected type: Text
Actual type: String
• In the second argument of ‘Pandoc.RawBlock’, namely
‘(Text.unpack (encloseInVerbatim emphasized))’
In the expression:
Pandoc.RawBlock
(Pandoc.Format "latex")
(Text.unpack (encloseInVerbatim emphasized))
In an equation for ‘renderEmphasized’:
renderEmphasized _ (_, classes, _) lines'
= Pandoc.RawBlock
(Pandoc.Format "latex")
(Text.unpack (encloseInVerbatim emphasized))
where
languageAttr
= case classes of
[lang] -> ",language=" <> Text.pack lang
_ -> ""
encloseInTextIt style t
| Text.null t = t
| otherwise
= case style of
Inline -> "£\\CodeEmphasis{" <> t <> "}£"
Block -> "£\\CodeEmphasisLine{" <> t <> "}£"
emphasizeNonSpace style t
| Text.null t = t
| otherwise = let ... in mconcat [...]
emphasizeChunk chunk
= case chunk of
Literal t -> t
Emphasized style t
-> emphasizeNonSpace style (Text.concatMap escaped t)
....
|
48 | (Text.unpack (encloseInVerbatim emphasized))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/private/var/folders/3b/9plp3gb959gcv_nyqg9j_k740000gn/T/stack70671/pandoc-emphasize-code-0.2.4/src/Text/Pandoc/Filter/EmphasizeCode/Latex.hs:52:47: error:
• Couldn't match type ‘Text’ with ‘[Char]’
Expected type: String
Actual type: Text
• In the first argument of ‘Text.pack’, namely ‘lang’
In the second argument of ‘(<>)’, namely ‘Text.pack lang’
In the expression: ",language=" <> Text.pack lang
|
52 | [lang] -> ",language=" <> Text.pack lang
| ^^^^