diff options
| author | John MacFarlane <[email protected]> | 2024-06-12 10:27:01 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-06-12 10:27:32 -0700 |
| commit | b2f0d8e7992d9f3e0d655a49a89f77c48a802c1c (patch) | |
| tree | c8bacd0cef07e32d5805824c0c02d68ce38d2c98 /src/Text | |
| parent | 7e89a47f2e90009695133642ed72e466c5b0d1a5 (diff) | |
Docx reader: rename TblCaption to Capt.
We'll use this for image captions as well. Word does not really
distinguish these.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 4 | ||||
| -rw-r--r-- | src/Text/Pandoc/Readers/Docx/Parse.hs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index c3d3d3eb4..a1112c53d 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -665,7 +665,7 @@ normalizeToClassName = T.map go . fromStyleName | otherwise = c bodyPartToTableCaption :: PandocMonad m => BodyPart -> DocxContext m (Maybe Blocks) -bodyPartToTableCaption (TblCaption pPr parparts) = +bodyPartToTableCaption (Capt pPr parparts) = Just <$> bodyPartToBlocks (Paragraph pPr parparts) bodyPartToTableCaption _ = pure Nothing @@ -767,7 +767,7 @@ bodyPartToBlocks (ListItem pPr _ _ _ parparts) = let pPr' = pPr {pStyle = constructBogusParStyleData "list-paragraph": pStyle pPr} in bodyPartToBlocks $ Paragraph pPr' parparts -bodyPartToBlocks (TblCaption _ _) = +bodyPartToBlocks (Capt _ _) = return mempty bodyPartToBlocks (Tbl _ _ _ []) = return mempty diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs index 122d83138..16f7234d5 100644 --- a/src/Text/Pandoc/Readers/Docx/Parse.hs +++ b/src/Text/Pandoc/Readers/Docx/Parse.hs @@ -284,7 +284,7 @@ defaultParagraphStyle = ParagraphStyle { pStyle = [] data BodyPart = Paragraph ParagraphStyle [ParPart] | ListItem ParagraphStyle T.Text T.Text (Maybe Level) [ParPart] | Tbl T.Text TblGrid TblLook [Row] - | TblCaption ParagraphStyle [ParPart] + | Capt ParagraphStyle [ParPart] | HRule deriving Show @@ -830,7 +830,7 @@ elemToBodyPart ns element case pHeading parstyle of Nothing | Just (numId, lvl) <- pNumInfo parstyle -> do mkListItem parstyle numId lvl parparts - _ -> return $ (if hasCaptionStyle then TblCaption else Paragraph) + _ -> return $ (if hasCaptionStyle then Capt else Paragraph) parstyle parparts elemToBodyPart ns element |
