File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ document.addEventListener('DOMContentLoaded', function () {
154154 }
155155 }
156156
157- console . log ( roleDiv . classList )
157+ // console.log(roleDiv.classList)
158158
159159 if ( roleDiv . classList . contains ( 'admonitionblock' ) ) {
160160 labelsLocation = roleDiv . querySelector ( 'td.content' )
@@ -169,6 +169,17 @@ document.addEventListener('DOMContentLoaded', function () {
169169 }
170170 } )
171171
172+ // for compatibility with @neo 4j-antora/roles-labels < 0.1.5
173+ // get all the exampleblocks where there is a child title and labels div
174+ // for every block, if it has a title and labels div, move the title div to be the first child of the exampleblock
175+ const labeledExamples = document . querySelectorAll ( 'div.exampleblock.has-label' )
176+ labeledExamples . forEach ( function ( example ) {
177+ const titleDiv = example . querySelector ( 'div.title' )
178+ if ( titleDiv ) {
179+ example . prepend ( titleDiv )
180+ }
181+ } )
182+
172183 // check whether div containing header labels has wrapped onto new line
173184 // if it has wrapped, we left-align the div
174185 checkWrapped ( )
You can’t perform that action at this time.
0 commit comments