Skip to content

Commit

Permalink
fix bold spans issue
Browse files Browse the repository at this point in the history
  • Loading branch information
amol-anand committed Aug 7, 2023
1 parent 1c364de commit ec7433d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/importer/import-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ export default {
});
}

// Need this to fix issue where b>span does not translate well like span>b
const boldSpans = main.querySelectorAll('b span');
if (boldSpans.length > 0) {
boldSpans.forEach((boldSpan) => {
boldSpan.parentElement.innerHTML = boldSpan.innerHTML.trim();
});
}

// Check if the page has a Document Information right nav and import it as a block instead
const documentInfoSpan = main.querySelector('span.cmp-text__eyebrow-eyebrow');
if (documentInfoSpan && documentInfoSpan.innerHTML === 'Document Information') {
Expand Down

0 comments on commit ec7433d

Please sign in to comment.