From 6e467c26c498328ca9c151295c850939e0660e6b Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Mon, 12 Feb 2007 17:18:20 +0000 Subject: Replaced "choice [(try (string ...), ...]" idiom with "oneOfStrings" in LaTeX reader. git-svn-id: https://pandoc.googlecode.com/svn/trunk@528 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/LaTeX.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 150b7cb6f..5e5324f79 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -423,24 +423,24 @@ specialAccentedChar = choice [ ccedil, aring, iuml, szlig, aelig, ccedil = try (do char '\\' - letter <- choice [try (string "cc"), try (string "cC")] + letter <- oneOfStrings ["cc", "cC"] let num = if letter == "cc" then 231 else 199 return (Str [chr num])) aring = try (do char '\\' - letter <- choice [try (string "aa"), try (string "AA")] + letter <- oneOfStrings ["aa", "AA"] let num = if letter == "aa" then 229 else 197 return (Str [chr num])) iuml = try (do string "\\\"" - choice [try (string "\\i"), try (string "{\\i}")] + oneOfStrings ["\\i", "{\\i}"] return (Str [chr 239])) icirc = try (do string "\\^" - choice [try (string "\\i"), try (string "{\\i}")] + oneOfStrings ["\\i", "{\\i}"] return (Str [chr 238])) szlig = try (do @@ -455,7 +455,7 @@ oslash = try (do aelig = try (do char '\\' - letter <- choice [try (string "ae"), try (string "AE")] + letter <- oneOfStrings ["ae", "AE"] let num = if letter == "ae" then 230 else 198 return (Str [chr num])) -- cgit v1.2.3