aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua/Marshaling
diff options
context:
space:
mode:
authorVaibhav Sagar <vaibhavsagar@gmail.com>2020-04-28 22:53:06 +0800
committerGitHub <noreply@github.com>2020-04-28 07:53:06 -0700
commit9c2b659eeb196145f62d8eae0072c279a7c2d751 (patch)
treef3c97feb0f1d063e2a7c65904c9fbe1591104a05 /src/Text/Pandoc/Lua/Marshaling
parent8d09a92d979126a53ec72ec73294ad04f811e9a7 (diff)
downloadpandoc-9c2b659eeb196145f62d8eae0072c279a7c2d751.tar.gz
Support new Underline element in readers and writers (#6277)
Deprecate `underlineSpan` in Shared in favor of `Text.Pandoc.Builder.underline`.
Diffstat (limited to 'src/Text/Pandoc/Lua/Marshaling')
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/AST.hs2
1 files changed, 2 insertions, 0 deletions
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)