From 9c2b659eeb196145f62d8eae0072c279a7c2d751 Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Tue, 28 Apr 2020 22:53:06 +0800 Subject: Support new Underline element in readers and writers (#6277) Deprecate `underlineSpan` in Shared in favor of `Text.Pandoc.Builder.underline`. --- src/Text/Pandoc/Lua/Marshaling/AST.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Text/Pandoc/Lua/Marshaling') diff --git a/src/Text/Pandoc/Lua/Marshaling/AST.hs b/src/Text/Pandoc/Lua/Marshaling/AST.hs index 8d7e83dc1..359ed6c30 100644 --- a/src/Text/Pandoc/Lua/Marshaling/AST.hs +++ b/src/Text/Pandoc/Lua/Marshaling/AST.hs @@ -303,6 +303,7 @@ pushInline = \case Cite citations lst -> pushViaConstructor "Cite" lst citations Code attr lst -> pushViaConstructor "Code" lst (LuaAttr attr) Emph inlns -> pushViaConstructor "Emph" inlns + Underline inlns -> pushViaConstructor "Underline" inlns Image attr alt (src,tit) -> pushViaConstructor "Image" alt src tit (LuaAttr attr) LineBreak -> pushViaConstructor "LineBreak" Link attr lst (src,tit) -> pushViaConstructor "Link" lst src tit (LuaAttr attr) @@ -328,6 +329,7 @@ peekInline idx = defineHowTo "get Inline value" $ do "Cite" -> uncurry Cite <$> elementContent "Code" -> withAttr Code <$> elementContent "Emph" -> Emph <$> elementContent + "Underline" -> Underline <$> elementContent "Image" -> (\(LuaAttr attr, lst, tgt) -> Image attr lst tgt) <$> elementContent "Link" -> (\(LuaAttr attr, lst, tgt) -> Link attr lst tgt) -- cgit v1.2.3