Skip to content

Commit

Permalink
Fix GitHub wiki html parsing
Browse files Browse the repository at this point in the history
Fixes #1661
  • Loading branch information
MrBurrBurr committed Mar 17, 2024
1 parent b241705 commit b112518
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/loadParameterDescriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ export default async function loadParameterDescriptions(version, locale) {
}

const descriptions = {};

const configWiki = await fetchWiki('Configuration', version, locale);
const virtualDOM = createVirtualDOM(configWiki);
const parametersHTML = Array.from(virtualDOM.querySelectorAll('h3 > code'));

parametersHTML.forEach(parameterHTML => {
const parameterName = parameterHTML.innerText;

const parameterDescription = [];
let description = parameterHTML.parentElement.nextElementSibling;
let description = parameterHTML.parentElement.parentElement.nextElementSibling;

while (description && description.tagName.toLowerCase() !== 'hr') {
const wikiLinks = description.querySelectorAll('a[href^="#"]');
Expand Down

0 comments on commit b112518

Please sign in to comment.