@@ -536,12 +536,9 @@ regularKey = try $ do
536536 -- inline
537537 --
538538
539−text = choice [ strong, emph, code, str, tabchar, whitespace,
540− endline ] <?> "text"
541−
542−inline = choice [ escapedChar, special, hyphens, text, symbol ] <?> "inline"
543−
544−special = choice [ link, image ] <?> "link, inline html, or image"
539+inline = choice [ escapedChar, link, image, hyphens, strong, emph,
540+ superscript, subscript, code,
541+ str, tabchar, whitespace, endline, symbol ] <?> "inline"
545542
546543hyphens = try (do
547544 result <- many1 (char '-')
@@ -567,9 +564,17 @@ emph = do
567564 return (Emph (normalizeSpaces result))
568565
569566strong = do
570− result <- enclosed (try (string "**")) (try (string "**")) inline
567+ result <- enclosed (string "**") (string "**") inline
571568 return (Strong (normalizeSpaces result))
572569
570+superscript = do
571+ result <- enclosed (string "\\ :sup:`") (string "`\\ ") anyChar
572+ return (Superscript [Str result])
573+
574+subscript = do
575+ result <- enclosed (string "\\ :sub:`") (string "`\\ ") anyChar
576+ return (Subscript [Str result])
577+
573578whitespace = do
574579 many1 spaceChar <?> "whitespace"
575580 return Space