diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-23 10:55:56 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-26 17:22:53 -0800 |
commit | bd43c0f4c940b755e2d68c7146c7f5201fb181d9 (patch) | |
tree | 502cab13026c8a3263387ae4578cbf5e7fc6a2b7 /src/Text/Pandoc/Shared.hs | |
parent | 5bee388914283825491bc1256162f9744743d976 (diff) | |
download | pandoc-bd43c0f4c940b755e2d68c7146c7f5201fb181d9.tar.gz |
Bumped version to 1.8; depend on pandoc-types 1.8.
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.
All modules updated to use the new raw elements.
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 81c552e41..0235a536a 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -267,7 +267,7 @@ removeEmptyBlocks (Null : xs) = removeEmptyBlocks xs removeEmptyBlocks (BulletList [] : xs) = removeEmptyBlocks xs removeEmptyBlocks (OrderedList _ [] : xs) = removeEmptyBlocks xs removeEmptyBlocks (DefinitionList [] : xs) = removeEmptyBlocks xs -removeEmptyBlocks (RawHtml [] : xs) = removeEmptyBlocks xs +removeEmptyBlocks (RawBlock _ [] : xs) = removeEmptyBlocks xs removeEmptyBlocks (x:xs) = x : removeEmptyBlocks xs removeEmptyBlocks [] = [] @@ -278,8 +278,7 @@ removeEmptyInlines (Subscript [] : zs) = removeEmptyInlines zs removeEmptyInlines (Superscript [] : zs) = removeEmptyInlines zs removeEmptyInlines (SmallCaps [] : zs) = removeEmptyInlines zs removeEmptyInlines (Strikeout [] : zs) = removeEmptyInlines zs -removeEmptyInlines (TeX [] : zs) = removeEmptyInlines zs -removeEmptyInlines (HtmlInline [] : zs) = removeEmptyInlines zs +removeEmptyInlines (RawInline _ [] : zs) = removeEmptyInlines zs removeEmptyInlines (Code [] : zs) = removeEmptyInlines zs removeEmptyInlines (x : xs) = x : removeEmptyInlines xs removeEmptyInlines [] = [] @@ -311,10 +310,8 @@ consolidateInlines (SmallCaps xs : SmallCaps ys : zs) = consolidateInlines $ SmallCaps (xs ++ ys) : zs consolidateInlines (Strikeout xs : Strikeout ys : zs) = consolidateInlines $ Strikeout (xs ++ ys) : zs -consolidateInlines (TeX x : TeX y : zs) = consolidateInlines $ - TeX (x ++ y) : zs -consolidateInlines (HtmlInline x : HtmlInline y : zs) = consolidateInlines $ - HtmlInline (x ++ y) : zs +consolidateInlines (RawInline f x : RawInline f' y : zs) | f == f' = + consolidateInlines $ RawInline f (x ++ y) : zs consolidateInlines (Code x : Code y : zs) = consolidateInlines $ Code (x ++ y) : zs consolidateInlines (x : xs) = x : consolidateInlines xs |