Commit 90403e13 authored by Maria Iliadi's avatar Maria Iliadi

Glossary: Exclude terms without title and remove undefined hoverText

parent 47728a33
Pipeline #15667 passed with stage
in 2 minutes and 21 seconds
......@@ -129,7 +129,13 @@ function generateGlossary(data) {
//append all markdown terms in a variable
let content = "";
data.forEach(item => {
content = content + `\n\n- **[${item.title}](${item.filepath})**: ${item.hoverText}\n`;
if (item.title !== undefined) {
if (item.hoverText === undefined) {
content = content + `\n\n- **[${item.title}](${item.filepath})**\n`;
} else {
content = content + `\n\n- **[${item.title}](${item.filepath})**: ${item.hoverText}\n`;
}
}
})
fs.readFile(glossaryPath, 'utf8', function(err, glossaryContent) {
if (err) throw err;
......
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