From dd8305d4d284540accfc90a3985837a24729ceac Mon Sep 17 00:00:00 2001 From: Peter Langenkamp Date: Thu, 29 Oct 2020 14:44:15 +0100 Subject: [PATCH] fix reference error --- plugins/terminology-parser/index.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/terminology-parser/index.js b/plugins/terminology-parser/index.js index 0bb4fe3..2e228ff 100644 --- a/plugins/terminology-parser/index.js +++ b/plugins/terminology-parser/index.js @@ -140,11 +140,10 @@ async function getGlossaryTerms(files) { let referencePath = TERMS_DIR + reference + '.md'; // Get the popup text for the term + // Get the popup text for the term let hoverText = await getHoverText(referencePath); - - const current_file_path = path.resolve(process.cwd(), filepath); - const term_path = path.resolve(process.cwd(), TERMS_DIR, reference); - const new_final_url = getRelativePath(current_file_path, term_path); + + const new_final_url = referencePath.slice(1,-3); if (hoverText === undefined) { var new_text = ('' + text + ''); @@ -163,8 +162,6 @@ async function getGlossaryTerms(files) { glossaryText: glossaryContent, filepath: filepath.slice(1,-3), }); - } else { - console.log(metadata.type); } } return arr; -- GitLab