mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-15 18:40:05 +00:00
feat(core): ✨ do not wrap nested tables
This commit is contained in:
parent
c10dd046c3
commit
3d14f9cf0b
|
@ -103,11 +103,12 @@ function wrapTable( table ) {
|
|||
* @return {void}
|
||||
*/
|
||||
function init( bodyContent ) {
|
||||
if ( !bodyContent.querySelector( 'table' ) ) {
|
||||
// Don't touch nested tables since we only need to wrap the outer layer
|
||||
if ( !bodyContent.querySelector( 'table:not( table table )' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
const tables = bodyContent.querySelectorAll( 'table' );
|
||||
const tables = bodyContent.querySelectorAll( 'table:not( table table )' );
|
||||
|
||||
tables.forEach( ( table ) => {
|
||||
wrapTable( table );
|
||||
|
|
Loading…
Reference in a new issue