@@ -721,10 +721,11 @@ data OrgTable = OrgTable
722table :: PandocMonad m => OrgParser m (F Blocks)
722table :: PandocMonad m => OrgParser m (F Blocks)
723table = try $ do
723table = try $ do
724− -- don't allow a table inside a list item; org requires that
724+ -- don't allow a table on the first line of a list item; org requires that
725 -- tables start at first non-space character on the line
725 -- tables start at first non-space character on the line
726− ctx <- orgStateParserContext <$> getState
726+ let isFirstInListItem st = (orgStateParserContext st == ListItemState) &&
727− guard (ctx == NullState)
727+ (orgStateLastPreCharPos st == Nothing)
728+ guard =<< not . isFirstInListItem <$> getState
728 blockAttrs <- blockAttributes
729 blockAttrs <- blockAttributes
729 lookAhead tableStart
730 lookAhead tableStart