@@ -536,12 +536,9 @@ regularKey = try $ do
536 -- inline
536 -- inline
539+inline = choice [ escapedChar, link, image, hyphens, strong, emph,
540+ superscript, subscript, code,
539−text = choice [ strong, emph, code, str, tabchar, whitespace,
541+ str, tabchar, whitespace, endline, symbol ] <?> "inline"
540− endline ] <?> "text"
542−inline = choice [ escapedChar, special, hyphens, text, symbol ] <?> "inline"
544−special = choice [ link, image ] <?> "link, inline html, or image"
546hyphens = try (do
543hyphens = try (do
547 result <- many1 (char '-')
544 result <- many1 (char '-')
@@ -567,9 +564,17 @@ emph = do
567 return (Emph (normalizeSpaces result))
564 return (Emph (normalizeSpaces result))
569strong = do
566strong = do
570− result <- enclosed (try (string "**")) (try (string "**")) inline
567+ result <- enclosed (string "**") (string "**") inline
571 return (Strong (normalizeSpaces result))
568 return (Strong (normalizeSpaces result))
571+ result <- enclosed (string "\\ :sup:`") (string "`\\ ") anyChar
572+ return (Superscript [Str result])
575+ result <- enclosed (string "\\ :sub:`") (string "`\\ ") anyChar
576+ return (Subscript [Str result])
573whitespace = do
578whitespace = do
574 many1 spaceChar <?> "whitespace"
579 many1 spaceChar <?> "whitespace"
575 return Space
580 return Space