@@ -381,6 +381,7 @@ inline = do
381381-- | Inline parsers tried in order
382382inlineParsers :: [Parser [Char] ParserState Inlines]
383383inlineParsers = [ inlineMarkup
384+ , groupedInlineMarkup
384385 , str
385386 , whitespace
386387 , endline
@@ -602,17 +603,10 @@ surrounded :: Parser [Char] st t -- ^ surrounding parser
602603surrounded border =
603604 enclosed (border *> notFollowedBy (oneOf " \t\n\r")) (try border)
604605
605−
606606simpleInline :: Parser [Char] ParserState t -- ^ surrounding parser
607− -> (Inlines -> Inlines) -- ^ Inline constructor
608− -> Parser [Char] ParserState Inlines -- ^ content parser (to be used repeatedly)
609−simpleInline border construct = groupedSimpleInline border construct
610− <|> ungroupedSimpleInline border construct
611−
612−ungroupedSimpleInline :: Parser [Char] ParserState t -- ^ surrounding parser
613− -> (Inlines -> Inlines) -- ^ Inline constructor
614− -> Parser [Char] ParserState Inlines -- ^ content parser (to be used repeatedly)
615−ungroupedSimpleInline border construct = try $ do
607+ -> (Inlines -> Inlines) -- ^ Inline constructor
608+ -> Parser [Char] ParserState Inlines -- ^ content parser (to be used repeatedly)
609+simpleInline border construct = try $ do
616610 st <- getState
617611 pos <- getPosition
618612 let afterString = stateLastStrPos st == Just pos
@@ -627,13 +621,11 @@ ungroupedSimpleInline border construct = try $ do
627621 then body
628622 else B.spanWith attr body
629623
630−groupedSimpleInline :: Parser [Char] ParserState t
631− -> (Inlines -> Inlines)
632− -> Parser [Char] ParserState Inlines
633−groupedSimpleInline border construct = try $ do
624+groupedInlineMarkup :: Parser [Char] ParserState Inlines
625+groupedInlineMarkup = try $ do
634626 char '['
635627 sp1 <- option mempty $ B.space <$ whitespace
636− result <- withQuoteContext InSingleQuote (simpleInline border construct)
628+ result <- withQuoteContext InSingleQuote inlineMarkup
637629 sp2 <- option mempty $ B.space <$ whitespace
638630 char ']'
639631 return $ sp1 <> result <> sp2