git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: Don't handle \label and \ref specially.

Put labels in {} instead of ().

commit18e7a7a49573a1256f4419fe03ad4b23749160c3 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 5 Jan 2011, 15:24 (16 years ago) parent1415b68
1 file changed−11
src/Text/Pandoc/Readers/LaTeX.hs−11
src/Text/Pandoc/Readers/LaTeX.hs−11
@@ -469,8 +469,6 @@ inline = choice [ str
469469 , strikeout
470470 , superscript
471471 , subscript
472− , ref
473− , lab
474472 , code
475473 , url
476474 , link
@@ -709,15 +707,6 @@ emDash = try (string "---") >> return EmDash
709707hyphen :: GenParser Char st Inline
710708hyphen = char '-' >> return (Str "-")
711709
712−lab :: GenParser Char st Inline
713−lab = try $ do
714− string "\\label{"
715− result <- manyTill anyChar (char '}')
716− return $ Str $ "(" ++ result ++ ")"
717−
718−ref :: GenParser Char st Inline
719−ref = try (string "\\ref{") >> manyTill anyChar (char '}') >>= return . Str
720−
721710strong :: GenParser Char ParserState Inline
722711strong = try (string "\\textbf{") >> manyTill inline (char '}') >>=
723712 return . Strong