git.iko.soy/typeable/pandoc
on master help sign in
Fixed round-trip HTML tests.

Exclude tables with cells with line breaks because they don't currently round-trip. (Table goes from being simple to having explicit widths.)

commit573214a06a7e962ce8d37b70f7934f509a6f3b75 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 18 Apr 2020, 20:57 (7 years ago) parent671bb42
1 file changed+5
test/Tests/Readers/HTML.hs+5
test/Tests/Readers/HTML.hs+5
@@ -36,11 +36,16 @@ makeRoundTrip :: Block -> Block
3636makeRoundTrip CodeBlock{} = Para [Str "code block was here"]
3737makeRoundTrip LineBlock{} = Para [Str "line block was here"]
3838makeRoundTrip RawBlock{} = Para [Str "raw block was here"]
39+makeRoundTrip b@Table{} = walk rmLineBreaks b
3940makeRoundTrip (Div attr bs) = Div attr $ filter (not . isHeaderBlock) bs
4041-- avoids round-trip failures related to makeSections
4142-- e.g. with [Div ("loc",[],[("a","11"),("b_2","a b c")]) [Header 3 ("",[],[]) []]]
4243makeRoundTrip x = x
4344
45+rmLineBreaks :: Inline -> Inline
46+rmLineBreaks LineBreak = SoftBreak
47+rmLineBreaks x = x
48+
4449removeRawInlines :: Inline -> Inline
4550removeRawInlines RawInline{} = Str "raw inline was here"
4651removeRawInlines x = x