File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed
test/baselines/generated-reference Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ export default class Figure extends Builder {
5656
5757 const captionElem = spec . doc . createElement ( 'figcaption' ) ;
5858 captionElem . innerHTML = figure . caption ;
59+
60+ if ( node . nodeName . split ( '-' ) [ 1 ] === 'FIGURE' ) {
61+ node . firstElementChild ?. appendChild ( captionElem ) ;
62+ } else {
5963 node . childNodes [ 0 ] . insertBefore ( captionElem , node . childNodes [ 0 ] . firstChild ) ;
64+ }
6065 }
6166}
Original file line number Diff line number Diff line change 1111 <li ><span >Jump to the most recent link target</span ><code >`</code ></li >
1212</ul ></div ><div id =" spec-container" >
1313<link rel =" stylesheet" href =" css/elements.css" >
14- <emu-figure id =" figure-1" ><figure >< figcaption >Figure 1</ figcaption >
14+ <emu-figure id =" figure-1" ><figure >
1515 this is a figure!
16- </figure ></emu-figure >
16+ <figcaption >Figure 1</ figcaption >< /figure ></emu-figure >
1717
1818<!-- deprecated: caption element -->
19- <emu-figure id =" figure-2" informative =" " caption =" Informative figure" ><figure >< figcaption >Figure 2 (Informative) — Informative figure</ figcaption >
19+ <emu-figure id =" figure-2" informative =" " caption =" Informative figure" ><figure >
2020 this is a figure!
21- </figure ></emu-figure >
21+ <figcaption >Figure 2 (Informative) — Informative figure</ figcaption >< /figure ></emu-figure >
2222
2323<emu-table id =" table-1" caption =" An example table" ><figure ><figcaption >Table 1 — An example table</figcaption >
2424 <table >
4242 </tbody ></table >
4343</figure ></emu-table >
4444
45- <emu-figure id =" figure-3" informative =" " ><figure >< figcaption >Figure 3 (Informative) — This is the caption</ figcaption >
45+ <emu-figure id =" figure-3" informative =" " ><figure >
4646
4747 this is a figure!
48- </figure ></emu-figure >
48+ <figcaption >Figure 3 (Informative) — This is the caption</ figcaption >< /figure ></emu-figure >
4949
5050<emu-table id =" table-3" ><figure ><figcaption >Table 3 — This is a table</figcaption >
5151
Original file line number Diff line number Diff line change @@ -94,9 +94,9 @@ <h1><span class="secnum">1.1</span> AbstractOp</h1>
9494 <p >And a third!</p >
9595 </div ></emu-note >
9696
97- <emu-figure id =" figure-1" ><figure >< figcaption >Figure 1</ figcaption >
97+ <emu-figure id =" figure-1" ><figure >
9898 this is a figure!
99- </figure ></emu-figure >
99+ <figcaption >Figure 1</ figcaption >< /figure ></emu-figure >
100100
101101 <emu-table id =" table-1" caption =" An example table" ><figure ><figcaption >Table 1 — An example table</figcaption >
102102 <table >
You can’t perform that action at this time.
0 commit comments