aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-08 12:28:13 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-08 12:28:13 +0100
commit410991ec6e3615613db5d7f58f8ec8221373d5fd (patch)
tree39c41020ef5400654c1451403c9badf8386d87a3 /src/Text/Pandoc
parent2c67101c7db845201c901775bd4be27b17391856 (diff)
downloadpandoc-410991ec6e3615613db5d7f58f8ec8221373d5fd.tar.gz
Org reader: don't allow tables inside list items.
Closes #3499.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index a5311e8f4..72d1f31dc 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -721,6 +721,10 @@ data OrgTable = OrgTable
table :: PandocMonad m => OrgParser m (F Blocks)
table = try $ do
+ -- don't allow a table inside a list item; org requires that
+ -- tables start at first non-space character on the line
+ ctx <- orgStateParserContext <$> getState
+ guard (ctx == NullState)
blockAttrs <- blockAttributes
lookAhead tableStart
do