aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog2
-rw-r--r--src/Text/Pandoc/Readers/Org.hs14
2 files changed, 6 insertions, 10 deletions
diff --git a/changelog b/changelog
index e012dabbf..fe3b1845b 100644
--- a/changelog
+++ b/changelog
@@ -17,7 +17,7 @@ pandoc (1.12.4.2)
+ Support code block headers (`#+BEGIN_SRC ...`) (Albert Krewinkel).
+ Fix parsing of blank lines within blocks (Albert Krewinkel).
+ Support pandoc citation extension (Albert Krewinkel). This can
- be turned off by specifying `org-citation` as the input format.
+ be turned off by specifying `org-citations` as the input format.
* Markdown reader:
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index c3ea8d7c2..0e872abf0 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -38,10 +38,9 @@ import qualified Text.Pandoc.Parsing as P
import Text.Pandoc.Parsing hiding ( F, unF, askF, asksF, runF
, newline, orderedListMarker
, parseFromString
- , updateLastStrPos )
+ )
import Text.Pandoc.Readers.LaTeX (inlineCommand, rawLaTeXInline)
import Text.Pandoc.Shared (compactify', compactify'DL)
-import Text.Parsec.Pos (updatePosString)
import Text.TeXMath (texMathToPandoc, DisplayType(..))
import Control.Applicative ( Applicative, pure
@@ -148,10 +147,6 @@ resetBlockAttributes :: OrgParser ()
resetBlockAttributes = updateState $ \s ->
s{ orgStateBlockAttributes = orgStateBlockAttributes def }
-updateLastStrPos :: OrgParser ()
-updateLastStrPos = getPosition >>= \p ->
- updateState $ \s -> s{ orgStateLastStrPos = Just p }
-
updateLastForbiddenCharPos :: OrgParser ()
updateLastForbiddenCharPos = getPosition >>= \p ->
updateState $ \s -> s{ orgStateLastForbiddenCharPos = Just p}
@@ -1376,8 +1371,9 @@ maybeRight = either (const Nothing) Just
inlineLaTeXCommand :: OrgParser String
inlineLaTeXCommand = try $ do
rest <- getInput
- pos <- getPosition
case runParser rawLaTeXInline def "source" rest of
- Right (RawInline _ cs) -> cs <$ (setInput $ drop (length cs) rest)
- <* (setPosition $ updatePosString pos cs)
+ Right (RawInline _ cs) -> do
+ let len = length cs
+ count len anyChar
+ return cs
_ -> mzero