Skip to content

Commit

Permalink
Merge pull request #714 from Dash-Industry-Forum/svrl_fix
Browse files Browse the repository at this point in the history
Svrl fix (Fixes #713)
  • Loading branch information
Phencys authored Nov 12, 2024
2 parents b18b71b + f476c19 commit 2a0d841
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Conformance-Frontend/services/conformance-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,16 @@ const ConformanceService = (function () {
.indexOf('>');
xmlEnd = info.length - xmlEnd;
let xmlString = info.substring(xmlStart, xmlEnd);
xmlString = xmlString.replaceAll(/svrl:/gi, 'svrl_');
xmlString = `<results>${xmlString}</results>`;
const parser = new DOMParser();
const xml = parser.parseFromString(xmlString, 'text/xml');
const xmlTestResults = Array.from(
xml.querySelectorAll('svrl:failed-assert'),
xml.querySelectorAll('svrl_failed-assert'),
);
for (const [index, xmlTestResult] of xmlTestResults.entries()) {
const xmlMessages = Array.from(
xmlTestResult.querySelectorAll('svrl:text'),
xmlTestResult.querySelectorAll('svrl_text'),
);
let messages = xmlMessages.map(
xmlMessage => xmlMessage.textContent,
Expand Down

0 comments on commit 2a0d841

Please sign in to comment.