git.iko.soy/typeable/pandoc
on master help sign in
Renamed parseFromStr -> parseFromString.
caef362fiddlosopher
src/Text/Pandoc/ParserCombinators.hs+3−3
@@ -38,7 +38,7 @@ module Text.Pandoc.ParserCombinators (
38 blanklines,
38 blanklines,
39 enclosed,
39 enclosed,
40 stringAnyCase,
40 stringAnyCase,
41− parseFromStr,
41+ parseFromString,
42 lineClump,
42 lineClump,
43 charsInBalanced
43 charsInBalanced
44 ) where
44 ) where
@@ -108,8 +108,8 @@ stringAnyCase (x:xs) = try (do
108 return (firstChar:rest))
108 return (firstChar:rest))
109
109
110-- | Parse contents of 'str' using 'parser' and return result.
110-- | Parse contents of 'str' using 'parser' and return result.
111−parseFromStr :: GenParser tok st a -> [tok] -> GenParser tok st a
111+parseFromString :: GenParser tok st a -> [tok] -> GenParser tok st a
112−parseFromStr parser str = try $ do
112+parseFromString parser str = try $ do
113 oldInput <- getInput
113 oldInput <- getInput
114 setInput str
114 setInput str
115 result <- parser
115 result <- parser
src/Text/Pandoc/Readers/Markdown.hs+3−3
@@ -591,14 +591,14 @@ rawTableLine indices = do
591-- Parse a table line and return a list of lists of blocks (columns).
591-- Parse a table line and return a list of lists of blocks (columns).
592tableLine indices = try $ do
592tableLine indices = try $ do
593 rawline <- rawTableLine indices
593 rawline <- rawTableLine indices
594− mapM (parseFromStr (many plain)) rawline
594+ mapM (parseFromString (many plain)) rawline
595
595
596-- Parse a multiline table row and return a list of blocks (columns).
596-- Parse a multiline table row and return a list of blocks (columns).
597multilineRow indices = try $ do
597multilineRow indices = try $ do
598 colLines <- many1 (rawTableLine indices)
598 colLines <- many1 (rawTableLine indices)
599 option "" blanklines
599 option "" blanklines
600 let cols = map unlines $ transpose colLines
600 let cols = map unlines $ transpose colLines
601− mapM (parseFromStr (many plain)) cols
601+ mapM (parseFromString (many plain)) cols
602
602
603-- Calculate relative widths of table columns, based on indices
603-- Calculate relative widths of table columns, based on indices
604widthsFromIndices :: Int -- Number of columns on terminal
604widthsFromIndices :: Int -- Number of columns on terminal
@@ -628,7 +628,7 @@ tableWith headerParser lineParser footerParser = try $ do
628 (rawHeads, aligns, indices) <- headerParser
628 (rawHeads, aligns, indices) <- headerParser
629 lines <- many1Till (lineParser indices) footerParser
629 lines <- many1Till (lineParser indices) footerParser
630 caption <- option [] tableCaption
630 caption <- option [] tableCaption
631− heads <- mapM (parseFromStr (many plain)) rawHeads
631+ heads <- mapM (parseFromString (many plain)) rawHeads
632 state <- getState
632 state <- getState
633 let numColumns = stateColumns state
633 let numColumns = stateColumns state
634 let widths = widthsFromIndices numColumns indices
634 let widths = widthsFromIndices numColumns indices