Skip to content

Commit

Permalink
Improve a variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
davivcu committed Oct 21, 2023
1 parent 1ba8832 commit 6a9d142
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/utils/xml-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export function getContentBetweenElementAndId(fromElement: XMLElement, toXMLID:
return { text: '', elements: [] };
}

const findID = toXMLID.replace('#','');
const cleanID = toXMLID.replace('#','');
let found = false;
// text after the milestone but still inside the parent element
let foundText = fromElement.nextSibling.textContent;
Expand All @@ -159,7 +159,7 @@ export function getContentBetweenElementAndId(fromElement: XMLElement, toXMLID:
while(!found && next !== null && maxExec !== 0) {
foundElements.push(next);
foundText = foundText + next.textContent;
if (next.getAttribute('xml:id') === findID) {
if (next.getAttribute('xml:id') === cleanID) {
found = true;
} else {
maxExec--;
Expand Down

0 comments on commit 6a9d142

Please sign in to comment.