From 3765f08304a642cd85691864c1fd988b6bdb1c27 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 12 Mar 2017 21:18:19 +0100 Subject: Revert "Shared: export extractIds." This reverts commit 0ef1e51211cd35b1ddb54a5fe8bee4247f1e1801. --- src/Text/Pandoc/Shared.hs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 95a53be72..3b9ae7501 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -64,7 +64,6 @@ module Text.Pandoc.Shared ( Element (..), hierarchicalize, uniqueIdent, - extractIds, inlineListToIdentifier, isHeaderBlock, headerShift, @@ -530,25 +529,6 @@ headerLtEq level (Header l _ _) = l <= level headerLtEq level (Div ("",["references"],[]) (Header l _ _ : _)) = l <= level headerLtEq _ _ = False --- | Extract the identifiers from a block element. -extractBlockIds :: Block -> Set.Set String -extractBlockIds (Header _ (ident,_,_) _) | not (null ident) = - Set.singleton ident -extractBlockIds (Div (ident,_,_) _) | not (null ident) = - Set.singleton ident -extractBlockIds _ = Set.empty - --- | Extract the identifiers from an inline element. -extractInlineIds :: Inline -> Set.Set String -extractInlineIds (Span (ident,_,_) _) | not (null ident) = - Set.singleton ident -extractInlineIds _ = Set.empty - --- | Extract the identifiers from a pandoc document. -extractIds :: Pandoc -> Set.Set String -extractIds doc = - query extractBlockIds doc `Set.union` query extractInlineIds doc - -- | Generate a unique identifier from a list of inlines. -- Second argument is a list of already used identifiers. uniqueIdent :: [Inline] -> Set.Set String -> String -- cgit v1.2.3