Skip to content

Commit

Permalink
updates in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLLamb committed Nov 5, 2024
1 parent 5059528 commit fc85e00
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions smpte.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,25 +693,24 @@ function insertConformance(docMetadata) {

if (docMetadata.pubType === smpte.EG_PUBTYPE) {

const sections = document.querySelectorAll('section');
sections.forEach((element) => {

const id = element.id;

for (let section of document.querySelectorAll("body > section")) {

let id = section.id;

if (id === "sec-front-matter" || id === "sec-foreword" || id === "sec-conformance")
return;
continue;

if (element.innerText.toLowerCase().includes("shall")) {
logger_.error(`EG must not contain Conformance Notation - "shall" found`, element);
if (section.innerText.toLowerCase().includes("shall")) {
logger_.error(`EG must not contain Conformance Notation - "shall" found`, section);
}
if (element.innerText.toLowerCase().includes("should")) {
logger_.error(`EG must not contain Conformance Notation - "should" found`, element);
if (section.innerText.toLowerCase().includes("should")) {
logger_.error(`EG must not contain Conformance Notation - "should" found`, section);
}
if (element.innerText.toLowerCase().includes("may")) {
logger_.error(`EG must not contain Conformance Notation - "may" found`, element);
if (section.innerText.toLowerCase().includes("may")) {
logger_.error(`EG must not contain Conformance Notation - "may" found`, section);
}

});
};
}

}
Expand Down

0 comments on commit fc85e00

Please sign in to comment.