Skip to content

Commit 3b33de2

Browse files
committed
test(HTML): add command tests for attributed p tags
- Add test cases for HTML to native, native to HTML, HTML to HTML, and HTML to HTML5 conversions - Verify preservation of id, class, and data attributes on p tags
1 parent 3389697 commit 3b33de2

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

test/command/10768.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
```
2+
% pandoc -f html -t native
3+
<p id="test" class="foo bar" data-custom="value">This is a paragraph with attributes.</p>
4+
^D
5+
[ Div
6+
( "test"
7+
, [ "foo" , "bar" ]
8+
, [ ( "wrapper" , "1" ) , ( "custom" , "value" ) ]
9+
)
10+
[ Para
11+
[ Str "This"
12+
, Space
13+
, Str "is"
14+
, Space
15+
, Str "a"
16+
, Space
17+
, Str "paragraph"
18+
, Space
19+
, Str "with"
20+
, Space
21+
, Str "attributes."
22+
]
23+
]
24+
]
25+
```
26+
27+
```
28+
% pandoc -f native -t html
29+
[ Div
30+
( "test"
31+
, [ "foo" , "bar" ]
32+
, [ ( "wrapper" , "1" ) , ( "custom" , "value" ) ]
33+
)
34+
[ Para
35+
[ Str "This"
36+
, Space
37+
, Str "is"
38+
, Space
39+
, Str "a"
40+
, Space
41+
, Str "paragraph"
42+
, Space
43+
, Str "with"
44+
, Space
45+
, Str "attributes."
46+
]
47+
]
48+
]
49+
^D
50+
<p id="test" class="foo bar" data-custom="value">This is a paragraph
51+
with attributes.</p>
52+
```
53+
54+
```
55+
% pandoc -f html -t html
56+
<p id="test" class="foo bar" data-custom="value">This is a paragraph with attributes.</p>
57+
^D
58+
<p id="test" class="foo bar" data-custom="value">This is a paragraph
59+
with attributes.</p>
60+
```
61+
62+
```
63+
% pandoc -f html -t html5
64+
<p id="test" class="foo bar" data-custom="value">This is a paragraph with attributes.</p>
65+
^D
66+
<p id="test" class="foo bar" data-custom="value">This is a paragraph
67+
with attributes.</p>
68+
```

0 commit comments

Comments
 (0)