diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-19 22:04:01 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-19 22:17:43 +0200 |
commit | 814ac51d3228eeb3bbcbf78a8a88a43cd11d23dd (patch) | |
tree | 25c4fbca3e8dff81527fdb4239dfe0ed14661d8d /src/Text/Pandoc/Readers/Textile.hs | |
parent | 4929d027dc57151dc7f009347478b35b90d2373b (diff) | |
download | pandoc-814ac51d3228eeb3bbcbf78a8a88a43cd11d23dd.tar.gz |
Separated tracing from logging.
Formerly tracing was just log messages with a DEBUG log
level. We now make these things independent. Tracing
can be turned on or off in PandocMonad using `setTrace`;
it is independent of logging.
* Removed `DEBUG` from `Verbosity`.
* Removed `ParserTrace` from `LogMessage`.
* Added `trace`, `setTrace` to `PandocMonad`.
Diffstat (limited to 'src/Text/Pandoc/Readers/Textile.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index 1669e3e51..96b51feef 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -61,10 +61,9 @@ import Text.HTML.TagSoup (Tag (..), fromAttrib) import Text.HTML.TagSoup.Match import Text.Pandoc.Builder (Blocks, Inlines, trimInlines) import qualified Text.Pandoc.Builder as B -import Text.Pandoc.Class (PandocMonad, report) +import Text.Pandoc.Class (PandocMonad(..)) import Text.Pandoc.CSS import Text.Pandoc.Definition -import Text.Pandoc.Logging import Text.Pandoc.Options import Text.Pandoc.Parsing import Text.Pandoc.Readers.HTML (htmlTag, isBlockTag, isInlineTag) @@ -143,8 +142,7 @@ blockParsers = [ codeBlock block :: PandocMonad m => ParserT [Char] ParserState m Blocks block = do res <- choice blockParsers <?> "block" - pos <- getPosition - report $ ParsingTrace (take 60 $ show $ B.toList res) pos + trace (take 60 $ show $ B.toList res) return res commentBlock :: PandocMonad m => ParserT [Char] ParserState m Blocks |