packages feed

pandoc-types 1.12.3.2 → 1.12.3.3

raw patch · 2 files changed

+31/−7 lines, 2 files

Files

Text/Pandoc/Walk.hs view
@@ -108,7 +108,7 @@   walk f (Superscript xs) = f $ Superscript (walk f xs)   walk f (SmallCaps xs)   = f $ SmallCaps (walk f xs)   walk f (Quoted qt xs)   = f $ Quoted qt (walk f xs)-  walk f (Cite cs xs)     = f $ Cite cs (walk f xs)+  walk f (Cite cs xs)     = f $ Cite (walk f cs) (walk f xs)   walk f (Code attr s)    = f $ Code attr s   walk f Space            = f Space   walk f LineBreak        = f LineBreak@@ -127,7 +127,9 @@   walkM f (Superscript xs)= Superscript <$> walkM f xs >>= f   walkM f (SmallCaps xs)  = SmallCaps <$> walkM f xs >>= f   walkM f (Quoted qt xs)  = Quoted qt <$> walkM f xs >>= f-  walkM f (Cite cs xs)    = Cite cs <$> walkM f xs >>= f+  walkM f (Cite cs xs)    = do cs' <- walkM f cs+                               xs' <- walkM f xs+                               f $ Cite cs' xs'   walkM f (Code attr s)   = f $ Code attr s   walkM f Space           = f Space   walkM f LineBreak       = f LineBreak@@ -146,7 +148,7 @@   query f (Superscript xs)= f (Superscript xs) <> query f xs   query f (SmallCaps xs)  = f (SmallCaps xs) <> query f xs   query f (Quoted qt xs)  = f (Quoted qt xs) <> query f xs-  query f (Cite cs xs)    = f (Cite cs xs) <> query f xs+  query f (Cite cs xs)    = f (Cite cs xs) <> query f cs <> query f xs   query f (Code attr s)   = f (Code attr s)   query f Space           = f Space   query f LineBreak       = f LineBreak@@ -261,7 +263,7 @@   walk f (Superscript xs)= Superscript (walk f xs)   walk f (SmallCaps xs)  = SmallCaps (walk f xs)   walk f (Quoted qt xs)  = Quoted qt (walk f xs)-  walk f (Cite cs xs)    = Cite cs (walk f xs)+  walk f (Cite cs xs)    = Cite (walk f cs) (walk f xs)   walk f (Code attr s)   = Code attr s   walk f Space           = Space   walk f LineBreak       = LineBreak@@ -280,7 +282,9 @@   walkM f (Superscript xs)= Superscript <$> walkM f xs   walkM f (SmallCaps xs)  = SmallCaps <$> walkM f xs   walkM f (Quoted qt xs)  = Quoted qt <$> walkM f xs-  walkM f (Cite cs xs)    = Cite cs <$> walkM f xs+  walkM f (Cite cs xs)    = do cs' <- walkM f cs+                               xs' <- walkM f xs+                               return $ Cite cs' xs'   walkM f (Code attr s)   = return $ Code attr s   walkM f Space           = return $ Space   walkM f LineBreak       = return $ LineBreak@@ -299,7 +303,7 @@   query f (Superscript xs)= query f xs   query f (SmallCaps xs)  = query f xs   query f (Quoted qt xs)  = query f xs-  query f (Cite cs xs)    = query f xs+  query f (Cite cs xs)    = query f cs <> query f xs   query f (Code attr s)   = mempty   query f Space           = mempty   query f LineBreak       = mempty@@ -387,6 +391,26 @@   query f (MetaInlines xs) = query f xs   query f (MetaBlocks bs)  = query f bs   query f (MetaMap m)      = query f m++instance Walkable Inline Citation where+  walk f (Citation id' pref suff mode notenum hash) =+    Citation id' (walk f pref) (walk f suff) mode notenum hash+  walkM f (Citation id' pref suff mode notenum hash) =+    do pref' <- walkM f pref+       suff' <- walkM f suff+       return $ Citation id' pref' suff' mode notenum hash+  query f (Citation id' pref suff mode notenum hash) =+    query f pref <> query f suff++instance Walkable Block Citation where+  walk f (Citation id' pref suff mode notenum hash) =+    Citation id' (walk f pref) (walk f suff) mode notenum hash+  walkM f (Citation id' pref suff mode notenum hash) =+    do pref' <- walkM f pref+       suff' <- walkM f suff+       return $ Citation id' pref' suff' mode notenum hash+  query f (Citation id' pref suff mode notenum hash) =+    query f pref <> query f suff  instance Walkable a b => Walkable a [b] where   walk f xs  = map (walk f) xs
pandoc-types.cabal view
@@ -1,5 +1,5 @@ Name:                pandoc-types-Version:             1.12.3.2+Version:             1.12.3.3 Synopsis:            Types for representing a structured document Description:         @Text.Pandoc.Definition@ defines the 'Pandoc' data                      structure, which is used by pandoc to represent