diff options
author | Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> | 2017-12-22 18:30:22 +1300 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-21 22:30:22 -0700 |
commit | a5d7be075d6aa3afd817bfb754b5c84cac63614b (patch) | |
tree | 42d360a253afc019bde5bbec44498e61b059d3fa /src | |
parent | de8c47eae807ae8ecc96eb24cd1fed6cf8e6b932 (diff) | |
download | pandoc-a5d7be075d6aa3afd817bfb754b5c84cac63614b.tar.gz |
JATS writer: Make <p> optional in <td> and <th> (#4178)
If the contents are single `Plain` block then do not wrap them with
a <p> element.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/JATS.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/JATS.hs b/src/Text/Pandoc/Writers/JATS.hs index ee3d61015..901bcb646 100644 --- a/src/Text/Pandoc/Writers/JATS.hs +++ b/src/Text/Pandoc/Writers/JATS.hs @@ -316,6 +316,9 @@ tableItemToJATS :: PandocMonad m -> Bool -> [Block] -> JATS m Doc +tableItemToJATS opts isHeader [Plain item] = + inTags True (if isHeader then "th" else "td") [] <$> + inlinesToJATS opts item tableItemToJATS opts isHeader item = (inTags True (if isHeader then "th" else "td") [] . vcat) <$> mapM (blockToJATS opts) item |