Commit 1a7f735f authored by Maria Iliadi's avatar Maria Iliadi

Parse: remove popup attr, if hoverText is undefined

parent 90403e13
Pipeline #15668 passed with stage
in 1 minute and 23 seconds
......@@ -84,8 +84,13 @@ async function parser(err, files) {
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);
var new_text = ('<Term popup="' + hoverText + '" reference="' +
new_final_url + '">' + text + '</Term>');
if (hoverText === undefined) {
var new_text = ('<Term reference="' + new_final_url + '">' +
text + '</Term>');
} else {
var new_text = ('<Term popup="' + hoverText + '" reference="' +
new_final_url + '">' + text + '</Term>');
}
content = content.replace(regex_match, new_text);
}
// Find the index of the 2nd occurrence of '---'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment