aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2014-09-04 01:53:56 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2014-09-04 19:55:53 -0400
commit73b887e2df06476bda567223f13d41bb34586f64 (patch)
tree535c9f6962c5086871e82a644f4a477b780a87ed /src/Text/Pandoc
parent08359c44e48987212867dc24f4db83ee611c8246 (diff)
downloadpandoc-73b887e2df06476bda567223f13d41bb34586f64.tar.gz
Org reader: Added state changing blanklines.
This allows us to emphasize at the beginning of a new paragraph (or, in general, after blank lines).
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Org.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index 62421d2fb..b07f96846 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -37,7 +37,7 @@ import Text.Pandoc.Options
import qualified Text.Pandoc.Parsing as P
import Text.Pandoc.Parsing hiding ( F, unF, askF, asksF, runF
, newline, orderedListMarker
- , parseFromString
+ , parseFromString, blanklines
)
import Text.Pandoc.Readers.LaTeX (inlineCommand, rawLaTeXInline)
import Text.Pandoc.Shared (compactify', compactify'DL)
@@ -242,6 +242,13 @@ newline =
<* updateLastPreCharPos
<* updateLastForbiddenCharPos
+-- | Like @Text.Parsec.Char.blanklines@, but causes additional state changes.
+blanklines :: OrgParser [Char]
+blanklines =
+ P.blanklines
+ <* updateLastPreCharPos
+ <* updateLastForbiddenCharPos
+
--
-- parsing blocks
--