aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-02-12 17:18:20 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-02-12 17:18:20 +0000
commit6e467c26c498328ca9c151295c850939e0660e6b (patch)
tree78e525aec354c8f754cc48751c71171b793b33a4
parentf3437dd27cbc3e82cdcef7433d0fbff5acd22eb9 (diff)
downloadpandoc-6e467c26c498328ca9c151295c850939e0660e6b.tar.gz
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
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs10
1 files changed, 5 insertions, 5 deletions
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]))