diff options
| author | John MacFarlane <[email protected]> | 2022-08-30 09:04:51 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-08-30 09:05:40 -0700 |
| commit | 6f52c77a7e7a40d085de964bb8c838a84d3ef9fb (patch) | |
| tree | 4167b5203c624ef447629fc7fdcb6a5eec55978f | |
| parent | 2d86b8dea900a5c7310ed4301865cb454dcda0c4 (diff) | |
Markdown: Allow table caption labels to start with lowercase t.
Closes #8259.
| -rw-r--r-- | MANUAL.txt | 4 | ||||
| -rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index adcbf535a..5a6771c8e 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -4243,8 +4243,8 @@ proportionally spaced fonts, as it does not require lining up columns. A caption may optionally be provided with all 4 kinds of tables (as illustrated in the examples below). A caption is a paragraph beginning -with the string `Table:` (or just `:`), which will be stripped off. -It may appear either before or after the table. +with the string `Table:` (or `table:` or just `:`), which will be stripped +off. It may appear either before or after the table. #### Extension: `simple_tables` #### diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 47284b7e8..b1e7dfdcc 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1299,7 +1299,8 @@ tableCaption = do guardEnabled Ext_table_captions try $ do skipNonindentSpaces - (string ":" <* notFollowedBy (satisfy isPunctuation)) <|> string "Table:" + (string ":" <* notFollowedBy (satisfy isPunctuation)) <|> + (oneOf ['T','t'] >> string "able:") trimInlinesF <$> inlines1 <* blanklines -- Parse a simple table with '---' header and one line per row. |
