From c995e84d71d02ce705412b2e82f336079acbf605 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 4 Feb 2016 14:27:03 +0100 Subject: better alt text for math --- src/Site.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Site.hs b/src/Site.hs index 03b6e16..bf501d8 100644 --- a/src/Site.hs +++ b/src/Site.hs @@ -214,16 +214,16 @@ texTransform :: Pandoc -> Compiler Pandoc texTransform = walkM texTransformInline <=< walkM texTransformBlock where texTransformInline :: Inline -> Compiler Inline - texTransformInline (Math mathType tex) = (\html -> Span ("", [classOf mathType], []) [RawInline "html" html]) <$> texTransform' (wrapMath tex) - texTransformInline (RawInline "latex" tex) = (\html -> Span ("", [], []) [RawInline "html" html]) <$> texTransform' tex + texTransformInline (Math mathType tex) = (\html -> Span ("", [classOf mathType], []) [RawInline "html" html]) <$> texTransform' wrapMath tex + texTransformInline (RawInline "latex" tex) = (\html -> Span ("", [], []) [RawInline "html" html]) <$> texTransform' id tex texTransformInline x = return x texTransformBlock :: Block -> Compiler Block - texTransformBlock (RawBlock "latex" tex) = (\html -> Div ("", [], []) [RawBlock "html" html]) <$> texTransform' tex + texTransformBlock (RawBlock "latex" tex) = (\html -> Div ("", [], []) [RawBlock "html" html]) <$> texTransform' id tex texTransformBlock x = return x - texTransform' :: String -> Compiler String - texTransform' tex = do + texTransform' :: (String -> String) -> String -> Compiler String + texTransform' texT tex = do let - texId = texTranslation' tex + texId = texTranslation' $ texT tex alignment <- loadSnapshotBody texId "alignment" return $ printf "%s" (toFilePath texId) (alignment :: String) tex -- cgit v1.2.3