git.iko.soy/typeable/pandoc
on master help sign in
Add `empty_paragraphs` extension.

* Deprecate `--strip-empty-paragraphs` option. Instead we now use an `empty_paragraphs` extension that can be enabled on the reader or writer. By default, disabled. * Add `Ext_empty_paragraphs` constructor to `Extension`. * Revert "Docx reader: don't strip out empty paragraphs." This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b. * Implement `empty_paragraphs` extension in docx reader and writer, opendocument writer, html reader and writer. * Add tests for `empty_paragraphs` extension.

commitae60e0196c5c12d358002cf3251dfebf07c66da6 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 4 Dec 2017, 10:31 (9 years ago) parentc58ecde
15 files changed+175−80
MANUAL.txt+8−1 src/Text/Pandoc/App.hs+11−8 src/Text/Pandoc/Extensions.hs+1 src/Text/Pandoc/Readers/Docx.hs+4−1 src/Text/Pandoc/Readers/HTML.hs+9−4 src/Text/Pandoc/Writers/Docx.hs+16−13 src/Text/Pandoc/Writers/HTML.hs+9−5 src/Text/Pandoc/Writers/OpenDocument.hs+2−2 test/Tests/Readers/Docx.hs+7−20 test/command/2649.md+3−6 test/command/3494.md+1−2 test/command/empty_paragraphs.md+95 test/docx/0_level_headers.native+8−8 test/docx/comments.native+1−1 test/docx/drop_cap_nostrip.native−9
MANUAL.txt+8−1
@@ -429,7 +429,8 @@ Reader options
429429
430430`--strip-empty-paragraphs`
431431
432−: Ignore paragraphs with non content. This option is useful
432+: *Deprecated. Use the `+empty_paragraphs` extension instead.*
433+ Ignore paragraphs with no content. This option is useful
433434 for converting word processing documents where users have
434435 used empty paragraphs to create inter-paragraph space.
435436
@@ -3817,6 +3818,12 @@ in several respects:
38173818 we must either disallow lazy wrapping or require a blank line between
38183819 list items.
38193820
3821+#### Extension: `empty_paragraphs` ####
3822+
3823+Allows empty paragraphs. By default empty paragraphs are
3824+omitted. This affects the `docx` reader and writer, the
3825+`opendocument` and `odt` writer, and all HTML-based readers and writers.
3826+
38203827Markdown variants
38213828-----------------
38223829
src/Text/Pandoc/App.hs+11−8
@@ -947,7 +947,10 @@ options =
947947
948948 , Option "" ["strip-empty-paragraphs"]
949949 (NoArg
950− (\opt -> return opt{ optStripEmptyParagraphs = True }))
950+ (\opt -> do
951+ deprecatedOption "--stripEmptyParagraphs"
952+ "Use +empty_paragraphs extension."
953+ return opt{ optStripEmptyParagraphs = True }))
951954 "" -- "Strip empty paragraphs"
952955
953956 , Option "" ["indented-code-classes"]
@@ -1472,7 +1475,7 @@ options =
14721475 , Option "m" ["latexmathml", "asciimathml"]
14731476 (OptArg
14741477 (\arg opt -> do
1475− deprecatedOption "--latexmathml, --asciimathml, -m"
1478+ deprecatedOption "--latexmathml, --asciimathml, -m" ""
14761479 return opt { optHTMLMathMethod = LaTeXMathML arg })
14771480 "URL")
14781481 "" -- "Use LaTeXMathML script in html output"
@@ -1480,7 +1483,7 @@ options =
14801483 , Option "" ["mimetex"]
14811484 (OptArg
14821485 (\arg opt -> do
1483− deprecatedOption "--mimetex"
1486+ deprecatedOption "--mimetex" ""
14841487 let url' = case arg of
14851488 Just u -> u ++ "?"
14861489 Nothing -> "/cgi-bin/mimetex.cgi?"
@@ -1491,7 +1494,7 @@ options =
14911494 , Option "" ["jsmath"]
14921495 (OptArg
14931496 (\arg opt -> do
1494− deprecatedOption "--jsmath"
1497+ deprecatedOption "--jsmath" ""
14951498 return opt { optHTMLMathMethod = JsMath arg})
14961499 "URL")
14971500 "" -- "Use jsMath for HTML math"
@@ -1499,7 +1502,7 @@ options =
14991502 , Option "" ["gladtex"]
15001503 (NoArg
15011504 (\opt -> do
1502− deprecatedOption "--gladtex"
1505+ deprecatedOption "--gladtex" ""
15031506 return opt { optHTMLMathMethod = GladTeX }))
15041507 "" -- "Use gladtex for HTML math"
15051508
@@ -1699,9 +1702,9 @@ splitField s =
16991702baseWriterName :: String -> String
17001703baseWriterName = takeWhile (\c -> c /= '+' && c /= '-')
17011704
1702−deprecatedOption :: String -> IO ()
1703−deprecatedOption o =
1704− runIO (report $ Deprecated o "") >>=
1705+deprecatedOption :: String -> String -> IO ()
1706+deprecatedOption o msg =
1707+ runIO (report $ Deprecated o msg) >>=
17051708 \r -> case r of
17061709 Right () -> return ()
17071710 Left e -> E.throwIO e
src/Text/Pandoc/Extensions.hs+1
@@ -152,6 +152,7 @@ data Extension =
152152 | Ext_old_dashes -- ^ -- = em, - before number = en
153153 | Ext_spaced_reference_links -- ^ Allow space between two parts of ref link
154154 | Ext_amuse -- ^ Enable Text::Amuse extensions to Emacs Muse markup
155+ | Ext_empty_paragraphs -- ^ Allow empty paragraphs
155156 deriving (Show, Read, Enum, Eq, Ord, Bounded, Data, Typeable, Generic)
156157
157158-- | Extensions to be used with pandoc-flavored markdown.
src/Text/Pandoc/Readers/Docx.hs+4−1
@@ -534,7 +534,10 @@ bodyPartToBlocks (Paragraph pPr parparts)
534534 then do modify $ \s -> s { docxDropCap = ils' }
535535 return mempty
536536 else do modify $ \s -> s { docxDropCap = mempty }
537− return $ parStyleToTransform pPr $ para ils'
537+ opts <- asks docxOptions
538+ if isNull ils' && not (isEnabled Ext_empty_paragraphs opts)
539+ then return mempty
540+ else return $ parStyleToTransform pPr $ para ils'
538541bodyPartToBlocks (ListItem pPr numId lvl (Just levelInfo) parparts) = do
539542 let
540543 kvs = case levelInfo of
src/Text/Pandoc/Readers/HTML.hs+9−4
@@ -68,9 +68,11 @@ import Text.Pandoc.CSS (foldOrElse, pickStyleAttrProps)
6868import Text.Pandoc.Definition
6969import Text.Pandoc.Error
7070import Text.Pandoc.Logging
71−import Text.Pandoc.Options (Extension (Ext_epub_html_exts, Ext_native_divs, Ext_native_spans, Ext_raw_html),
72− ReaderOptions (readerExtensions, readerStripComments),
73− extensionEnabled)
71+import Text.Pandoc.Options (
72+ Extension (Ext_epub_html_exts, Ext_empty_paragraphs, Ext_native_divs,
73+ Ext_native_spans, Ext_raw_html),
74+ ReaderOptions (readerExtensions, readerStripComments),
75+ extensionEnabled)
7476import Text.Pandoc.Parsing hiding ((<|>))
7577import Text.Pandoc.Shared (addMetaField, crFilter, escapeURI, extractSpaces,
7678 safeRead, underlineSpan)
@@ -575,7 +577,10 @@ pPlain = do
575577pPara :: PandocMonad m => TagParser m Blocks
576578pPara = do
577579 contents <- trimInlines <$> pInTags "p" inline
578− return $ B.para contents
580+ (do guardDisabled Ext_empty_paragraphs
581+ guard (B.isNull contents)
582+ return mempty)
583+ <|> return (B.para contents)
579584
580585pFigure :: PandocMonad m => TagParser m Blocks
581586pFigure = try $ do
src/Text/Pandoc/Writers/Docx.hs+16−13
@@ -922,19 +922,22 @@ blockToOpenXML' opts (Para [Image attr alt (src,'f':'i':'g':':':tit)]) = do
922922 captionNode <- withParaProp (pCustomStyle "ImageCaption")
923923 $ blockToOpenXML opts (Para alt)
924924 return $ mknode "w:p" [] (paraProps ++ contents) : captionNode
925−blockToOpenXML' opts (Para lst) = do
926− isFirstPara <- gets stFirstPara
927− paraProps <- getParaProps $ case lst of
928− [Math DisplayMath _] -> True
929− _ -> False
930− bodyTextStyle <- pStyleM "Body Text"
931− let paraProps' = case paraProps of
932− [] | isFirstPara -> [mknode "w:pPr" [] [pCustomStyle "FirstParagraph"]]
933− [] -> [mknode "w:pPr" [] [bodyTextStyle]]
934− ps -> ps
935− modify $ \s -> s { stFirstPara = False }
936− contents <- inlinesToOpenXML opts lst
937− return [mknode "w:p" [] (paraProps' ++ contents)]
925+blockToOpenXML' opts (Para lst)
926+ | null lst && not (isEnabled Ext_empty_paragraphs opts) = return []
927+ | otherwise = do
928+ isFirstPara <- gets stFirstPara
929+ paraProps <- getParaProps $ case lst of
930+ [Math DisplayMath _] -> True
931+ _ -> False
932+ bodyTextStyle <- pStyleM "Body Text"
933+ let paraProps' = case paraProps of
934+ [] | isFirstPara -> [mknode "w:pPr" []
935+ [pCustomStyle "FirstParagraph"]]
936+ [] -> [mknode "w:pPr" [] [bodyTextStyle]]
937+ ps -> ps
938+ modify $ \s -> s { stFirstPara = False }
939+ contents <- inlinesToOpenXML opts lst
940+ return [mknode "w:p" [] (paraProps' ++ contents)]
938941blockToOpenXML' opts (LineBlock lns) = blockToOpenXML opts $ linesToPara lns
939942blockToOpenXML' _ b@(RawBlock format str)
940943 | format == Format "openxml" = return [ x | Elem x <- parseXML str ]
src/Text/Pandoc/Writers/HTML.hs+9−5
@@ -56,7 +56,7 @@ import qualified Data.Text.Lazy as TL
5656import Network.HTTP (urlEncode)
5757import Network.URI (URI (..), parseURIReference, unEscapeString)
5858import Numeric (showHex)
59−import Text.Blaze.Internal (customLeaf)
59+import Text.Blaze.Internal (customLeaf, MarkupM(Empty))
6060import Text.Blaze.Html hiding (contents)
6161import Text.Pandoc.Definition
6262import Text.Pandoc.Highlighting (formatHtmlBlock, formatHtmlInline, highlight,
@@ -658,6 +658,7 @@ blockToHtml opts (Para [Image attr txt (s,'f':'i':'g':':':tit)]) =
658658 figure opts attr txt (s,tit)
659659blockToHtml opts (Para lst)
660660 | isEmptyRaw lst = return mempty
661+ | null lst && not (isEnabled Ext_empty_paragraphs opts) = return mempty
661662 | otherwise = do
662663 contents <- inlineListToHtml opts lst
663664 return $ H.p contents
@@ -902,8 +903,7 @@ tableItemToHtml opts tag' align' item = do
902903 let tag'' = if null alignStr
903904 then tag'
904905 else tag' ! attribs
905− return $ (
906− tag'' contents) >> nl opts
906+ return $ tag'' contents >> nl opts
907907
908908toListItems :: WriterOptions -> [Html] -> [Html]
909909toListItems opts items = map (toListItem opts) items ++ [nl opts]
@@ -911,9 +911,13 @@ toListItems opts items = map (toListItem opts) items ++ [nl opts]
911911toListItem :: WriterOptions -> Html -> Html
912912toListItem opts item = nl opts >> H.li item
913913
914−blockListToHtml :: PandocMonad m => WriterOptions -> [Block] -> StateT WriterState m Html
914+blockListToHtml :: PandocMonad m
915+ => WriterOptions -> [Block] -> StateT WriterState m Html
915916blockListToHtml opts lst =
916− (mconcat . intersperse (nl opts)) <$> mapM (blockToHtml opts) lst
917+ (mconcat . intersperse (nl opts) . filter nonempty)
918+ <$> mapM (blockToHtml opts) lst
919+ where nonempty (Empty _) = False
920+ nonempty _ = True
917921
918922-- | Convert list of Pandoc inline elements to HTML.
919923inlineListToHtml :: PandocMonad m => WriterOptions -> [Inline] -> StateT WriterState m Html
src/Text/Pandoc/Writers/OpenDocument.hs+2−2
@@ -130,7 +130,6 @@ setFirstPara :: PandocMonad m => OD m ()
130130setFirstPara = modify $ \s -> s { stFirstPara = True }
131131
132132inParagraphTags :: PandocMonad m => Doc -> OD m Doc
133−inParagraphTags d | isEmpty d = return empty
134133inParagraphTags d = do
135134 b <- gets stFirstPara
136135 a <- if b
@@ -323,7 +322,8 @@ blockToOpenDocument o bs
323322 else inParagraphTags =<< inlinesToOpenDocument o b
324323 | Para [Image attr c (s,'f':'i':'g':':':t)] <- bs
325324 = figure attr c s t
326− | Para b <- bs = if null b
325+ | Para b <- bs = if null b &&
326+ not (isEnabled Ext_empty_paragraphs o)
327327 then return empty
328328 else inParagraphTags =<< inlinesToOpenDocument o b
329329 | LineBlock b <- bs = blockToOpenDocument o $ linesToPara b
test/Tests/Readers/Docx.hs+7−20
@@ -10,7 +10,6 @@ import Test.Tasty
1010import Test.Tasty.HUnit
1111import Tests.Helpers
1212import Text.Pandoc
13−import Text.Pandoc.Shared (stripEmptyParagraphs)
1413import qualified Text.Pandoc.Class as P
1514import Text.Pandoc.MediaBag (MediaBag, lookupMedia, mediaDirectory)
1615import Text.Pandoc.UTF8 as UTF8
@@ -38,23 +37,20 @@ instance ToString NoNormPandoc where
3837instance ToPandoc NoNormPandoc where
3938 toPandoc = unNoNorm
4039
41−compareOutput :: Bool
42− -> ReaderOptions
43− -> FilePath
44− -> FilePath
45− -> IO (NoNormPandoc, NoNormPandoc)
46−compareOutput strip opts docxFile nativeFile = do
40+compareOutput :: ReaderOptions
41+ -> FilePath
42+ -> FilePath
43+ -> IO (NoNormPandoc, NoNormPandoc)
44+compareOutput opts docxFile nativeFile = do
4745 df <- B.readFile docxFile
4846 nf <- UTF8.toText <$> BS.readFile nativeFile
4947 p <- runIOorExplode $ readDocx opts df
5048 df' <- runIOorExplode $ readNative def nf
51− return $ (noNorm (if strip
52− then stripEmptyParagraphs p
53− else p), noNorm df')
49+ return $ (noNorm p, noNorm df')
5450
5551testCompareWithOptsIO :: ReaderOptions -> String -> FilePath -> FilePath -> IO TestTree
5652testCompareWithOptsIO opts name docxFile nativeFile = do
57− (dp, np) <- compareOutput True opts docxFile nativeFile
53+ (dp, np) <- compareOutput opts docxFile nativeFile
5854 return $ test id name (dp, np)
5955
6056testCompareWithOpts :: ReaderOptions -> String -> FilePath -> FilePath -> TestTree
@@ -75,11 +71,6 @@ testForWarningsWithOpts :: ReaderOptions -> String -> FilePath -> [String] -> Te
7571testForWarningsWithOpts opts name docxFile expected =
7672 unsafePerformIO $ testForWarningsWithOptsIO opts name docxFile expected
7773
78−testCompareNoStrip :: String -> FilePath -> FilePath -> TestTree
79−testCompareNoStrip name docxFile nativeFile = unsafePerformIO $ do
80− (dp, np) <- compareOutput False defopts docxFile nativeFile
81− return $ test id name (dp, np)
82−
8374-- testForWarnings :: String -> FilePath -> [String] -> TestTree
8475-- testForWarnings = testForWarningsWithOpts defopts
8576
@@ -266,10 +257,6 @@ tests = [ testGroup "inlines"
266257 "dropcap paragraphs"
267258 "docx/drop_cap.docx"
268259 "docx/drop_cap.native"
269− , testCompareNoStrip
270− "empty paragraphs without stripping"
271− "docx/drop_cap.docx"
272− "docx/drop_cap_nostrip.native"
273260 ]
274261 , testGroup "track changes"
275262 [ testCompare
test/command/2649.md+3−6
@@ -88,20 +88,17 @@
8888</tr>
8989<tr class="even">
9090<td><p>1</p></td>
91−<td>
92−<p><a href="Sébastien_Loeb" title="wikilink">Sébastien Loeb</a></p></td>
91+<td><p><a href="Sébastien_Loeb" title="wikilink">Sébastien Loeb</a></p></td>
9392<td><p>78</p></td>
9493</tr>
9594<tr class="odd">
9695<td><p>2</p></td>
97−<td>
98−<p><strong><a href="Sébastien_Ogier" title="wikilink">Sébastien Ogier</a></strong></p></td>
96+<td><p><strong><a href="Sébastien_Ogier" title="wikilink">Sébastien Ogier</a></strong></p></td>
9997<td><p>38</p></td>
10098</tr>
10199<tr class="even">
102100<td><p>10</p></td>
103−<td>
104−<p><a href="Hannu_Mikkola" title="wikilink">Hannu Mikkola</a></p></td>
101+<td><p><a href="Hannu_Mikkola" title="wikilink">Hannu Mikkola</a></p></td>
105102<td><p>18</p></td>
106103</tr>
107104</tbody>
test/command/3494.md+1−2
@@ -25,8 +25,7 @@
2525<td style="text-align: left;">thank you</td>
2626</tr>
2727<tr class="odd">
28−<td style="text-align: right;">
29−<p><em>blah</em></p></td>
28+<td style="text-align: right;"><p><em>blah</em></p></td>
3029<td style="text-align: left;"><em>blah</em></td>
3130<td style="text-align: left;"><em>blah</em></td>
3231</tr>
test/command/empty_paragraphs.mdnew file+95
@@ -0,0 +1,95 @@
1+```
2+% pandoc -f native -t docx | pandoc -f docx -t native
3+[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
4+^D
5+[Para [Str "hi"]
6+,Para [Str "lo"]]
7+```
8+
9+```
10+% pandoc -f native -t docx+empty_paragraphs | pandoc -f docx -t native
11+[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
12+^D
13+[Para [Str "hi"]
14+,Para [Str "lo"]]
15+```
16+
17+```
18+% pandoc -f native -t docx | pandoc -f docx+empty_paragraphs -t native
19+[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
20+^D
21+[Para [Str "hi"]
22+,Para [Str "lo"]]
23+```
24+
25+```
26+% pandoc -f native -t docx+empty_paragraphs | pandoc -f docx+empty_paragraphs -t native
27+[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
28+^D
29+[Para [Str "hi"]
30+,Para []
31+,Para []
32+,Para [Str "lo"]]
33+```
34+
35+```
36+% pandoc -f native -t html5
37+[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
38+^D
39+<p>hi</p>
40+
41+
42+<p>lo</p>
43+```
44+
45+```
46+% pandoc -f native -t html5+empty_paragraphs
47+[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
48+^D
49+<p>hi</p>
50+<p></p>
51+<p></p>
52+<p>lo</p>
53+```
54+
55+```
56+% pandoc -f html+empty_paragraphs -t native
57+<p>hi</p>
58+<p></p>
59+<p></p>
60+<p>lo</p>
61+^D
62+[Para [Str "hi"]
63+,Para []
64+,Para []
65+,Para [Str "lo"]]
66+```
67+
68+```
69+% pandoc -f html -t native
70+<p>hi</p>
71+<p></p>
72+<p></p>
73+<p>lo</p>
74+^D
75+[Para [Str "hi"]
76+,Para [Str "lo"]]
77+```
78+
79+```
80+% pandoc -f native -t opendocument+empty_paragraphs
81+[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
82+^D
83+<text:p text:style-name="Text_20_body">hi</text:p>
84+<text:p text:style-name="Text_20_body"></text:p>
85+<text:p text:style-name="Text_20_body"></text:p>
86+<text:p text:style-name="Text_20_body">lo</text:p>
87+```
88+
89+```
90+% pandoc -f native -t opendocument
91+[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
92+^D
93+<text:p text:style-name="Text_20_body">hi</text:p>
94+<text:p text:style-name="Text_20_body">lo</text:p>
95+```
test/docx/0_level_headers.native+8−8
@@ -1,15 +1,15 @@
11[Table [] [AlignDefault] [0.0]
22 [[]]
3− [[[Plain []]]
3+ [[[]]
44 ,[[Plain [Str "User\8217s",Space,Str "Guide"]]]
5− ,[[Plain []]]
6− ,[[Plain []]]
7− ,[[Plain []]]
5+ ,[[]]
6+ ,[[]]
7+ ,[[]]
88 ,[[Plain [Str "11",Space,Str "August",Space,Str "2017"]]]
9− ,[[Plain []]]
10− ,[[Plain []]]
11− ,[[Plain []]]
12− ,[[Plain []]]]
9+ ,[[]]
10+ ,[[]]
11+ ,[[]]
12+ ,[[]]]
1313,Para [Str "CONTENTS"]
1414,Para [Strong [Str "Section",Space,Str "Page"]]
1515,Para [Str "FIGURES",Space,Str "iv"]
test/docx/comments.native+1−1
@@ -1,4 +1,4 @@
11[Para [Str "I",Space,Str "want",Space,Span ("",["comment-start"],[("id","0"),("author","Jesse Rosenthal"),("date","2016-05-09T16:13:00Z")]) [Str "I",Space,Str "left",Space,Str "a",Space,Str "comment."],Str "some",Space,Str "text",Space,Str "to",Space,Str "have",Space,Str "a",Space,Str "comment",Space,Span ("",["comment-end"],[("id","0")]) [],Str "on",Space,Str "it."]
22,Para [Str "This",Space,Str "is",Space,Span ("",["comment-start"],[("id","1"),("author","Jesse Rosenthal"),("date","2016-05-09T16:13:00Z")]) [Str "A",Space,Str "comment",Space,Str "across",Space,Str "paragraphs."],Str "a",Space,Str "new",Space,Str "paragraph."]
33,Para [Str "And",Space,Str "so",Span ("",["comment-end"],[("id","1")]) [],Space,Str "is",Space,Str "this."]
4−,Para [Str "One",Space,Span ("",["comment-start"],[("id","2"),("author","Jesse Rosenthal"),("date","2016-05-09T16:14:00Z")]) [Str "This",Space,Str "one",Space,Str "has",Space,Str "multiple",Space,Str "paragraphs.",Space,Str "\182",Space,Str "\182",Space,Str "See?"],Str "more",Span ("",["comment-end"],[("id","2")]) [],Str ".",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "one",Space,Str "with",Space,Str "a",Space,Span ("",["comment-start"],[("id","3"),("author","Jesse Rosenthal"),("date","2016-06-22T14:35:00Z")]) [Str "Do",Space,Str "something."],Span ("",["comment-start"],[("id","4"),("author","Jesse Rosenthal"),("date","2016-06-22T14:36:00Z")]) [Str "Do",Space,Str "something",Space,Str "else."],Str "comment",Space,Str "in",Space,Str "a",Space,Str "comment",Span ("",["comment-end"],[("id","3")]) [Span ("",["comment-end"],[("id","4")]) []],Str "."]]
4+,Para [Str "One",Space,Span ("",["comment-start"],[("id","2"),("author","Jesse Rosenthal"),("date","2016-05-09T16:14:00Z")]) [Str "This",Space,Str "one",Space,Str "has",Space,Str "multiple",Space,Str "paragraphs.",Space,Str "\182",Space,Str "See?"],Str "more",Span ("",["comment-end"],[("id","2")]) [],Str ".",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "one",Space,Str "with",Space,Str "a",Space,Span ("",["comment-start"],[("id","3"),("author","Jesse Rosenthal"),("date","2016-06-22T14:35:00Z")]) [Str "Do",Space,Str "something."],Span ("",["comment-start"],[("id","4"),("author","Jesse Rosenthal"),("date","2016-06-22T14:36:00Z")]) [Str "Do",Space,Str "something",Space,Str "else."],Str "comment",Space,Str "in",Space,Str "a",Space,Str "comment",Span ("",["comment-end"],[("id","3")]) [Span ("",["comment-end"],[("id","4")]) []],Str "."]]
test/docx/drop_cap_nostrip.nativedeleted−9
@@ -1,9 +0,0 @@
1−[Para [Str "Drop",Space,Str "cap."]
2−,Para []
3−,Para [Str "Next",Space,Str "paragraph."]
4−,Para []
5−,Para [Str "Drop",Space,Str "cap",Space,Str "in",Space,Str "margin."]
6−,Para []
7−,Para []
8−,Para []
9−,Para [Str "Drop",Space,Str "cap",Space,Str "(not",Space,Str "really)."]]