Skip to content

Commit

Permalink
fix selector
Browse files Browse the repository at this point in the history
  • Loading branch information
vhargrave committed Jul 29, 2024
1 parent be6467a commit 609aae3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion express/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ export function buildAutoBlocks() {
function addJapaneseSectionHeaderSizing(area) {
import(`${getLibs()}/utils/utils.js`).then((mod) => {
if (mod.getConfig().locale.ietf === 'ja-JP' && mod.getMetadata('template') !== 'blog') {
const headings = area === document ? area.querySelectorAll('main > div > h1, main > div > h2') : area.querySelectorAll(':scope > div > h1, :scope > div > h2');
const context = area === document ? 'main' : ':scope';
const headings = area.querySelectorAll(`${context} > div > h1, ${context} > div > h2, ${context} .section > .content > h1, ${context} .section > .content > h2`);
if (headings.length) import('./utils/location-utils.js').then((locMod) => locMod.addHeaderSizing(headings, null));

Check warning on line 471 in express/scripts/utils.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Dependency cycle detected
}
});
Expand Down

0 comments on commit 609aae3

Please sign in to comment.