Commit 1a0fb2a 1 parent 627e226 commit 1a0fb2a Copy full SHA for 1a0fb2a
File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 39
39
it "can render multiple tables" do
40
40
expect ( renderer . render ( document ) . scan ( /<tbody>/ ) . size ) . to be == 2
41
41
end
42
+
43
+ it "generates the same output as the built in renderer" do
44
+ expect ( renderer . render ( document ) ) . to be == document . to_html
45
+ end
46
+ end
47
+
48
+ with "footnotes" do
49
+ let ( :markdown ) { "Hello[^hi].\n \n [^hi]: Hey!\n " }
50
+ let ( :document ) { Markly . parse ( markdown , flags : Markly ::FOOTNOTES ) }
51
+
52
+ it "can render footnotes" do
53
+ expect ( renderer . render ( document ) ) . to be == <<~HTML
54
+ < p > Hello< sup class ="footnote-ref "> < a href ="#fn-hi " id ="fnref-hi " data-footnote-ref > 1</ a > </ sup > .</ p >
55
+ < section class ="footnotes " data-footnotes >
56
+ < ol >
57
+ < li id ="fn-hi ">
58
+ < p > Hey! < a href ="#fnref-hi " class ="footnote-backref " data-footnote-backref data-footnote-backref-idx ="1 " aria-label ="Back to reference 1 "> ↩</ a > </ p >
59
+ </ li >
60
+ </ ol >
61
+ </ section >
62
+ HTML
63
+ end
64
+
65
+ it "generates the same output as the built in renderer" do
66
+ expect ( renderer . render ( document ) ) . to be == document . to_html
67
+ end
42
68
end
43
69
end
You can’t perform that action at this time.
0 commit comments