git.iko.soy/typeable/pandoc
on master help sign in
Removed an 'error' bomb.
commit6e6324badee219164bad271f3fcd037889962096 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 20 Jun 2017, 22:44 (9 years ago) parentc349f0b
1 file changed+4−1
src/Text/Pandoc/Readers/Markdown.hs+4−1
src/Text/Pandoc/Readers/Markdown.hs+4−1
@@ -55,6 +55,7 @@ import qualified Text.Pandoc.Builder as B
5555import Text.Pandoc.Class (PandocMonad(..), report)
5656import Text.Pandoc.Definition
5757import Text.Pandoc.Emoji (emojis)
58+import Text.Pandoc.Error
5859import Text.Pandoc.Logging
5960import Text.Pandoc.Options
6061import Text.Pandoc.Parsing hiding (tableWith)
@@ -368,7 +369,9 @@ parseMarkdown = do
368369 -- lookup to get sourcepos
369370 case M.lookup n (stateNotes' st) of
370371 Just (pos, _) -> report (NoteDefinedButNotUsed n pos)
371− Nothing -> error "The impossible happened.") notesDefined
372+ Nothing -> throwError $
373+ PandocShouldNeverHappenError "note not found")
374+ notesDefined
372375 let doc = runF (do Pandoc _ bs <- B.doc <$> blocks
373376 meta <- stateMeta' st
374377 return $ Pandoc meta bs) st