Commit af626e80 authored by Peter Langenkamp's avatar Peter Langenkamp

Bugfix in glossary references

parent 8d1c3b3d
...@@ -22,8 +22,6 @@ We may use the phrase %%natural guardianship|guardianship%% to refer to an guard ...@@ -22,8 +22,6 @@ We may use the phrase %%natural guardianship|guardianship%% to refer to an guard
The %%Guardianship pattern|pattern-guardianship%% provides an overview of how this concept fits in with related concepts. The %%Guardianship pattern|pattern-guardianship%% provides an overview of how this concept fits in with related concepts.
The %%Guardianship pattern|pattern-guardianship%% provides an overview of how this concept fits in with related concepts.
### Purpose ### Purpose
**Guardianship** is a means by which %%jurisdictions|jurisdiction%% provide assurances to %%parties|party%% (within its scope) that they can enjoy, dispose of and control in pretty much any way they like. The %%legal system|legal-system%% of the %%jurisdiction|jurisdiction%% specifies these rights, and provides ways in which the %%owner|owner%% can exercize them (that provides the assurance). **Guardianship** is a means by which %%jurisdictions|jurisdiction%% provide assurances to %%parties|party%% (within its scope) that they can enjoy, dispose of and control in pretty much any way they like. The %%legal system|legal-system%% of the %%jurisdiction|jurisdiction%% specifies these rights, and provides ways in which the %%owner|owner%% can exercize them (that provides the assurance).
......
...@@ -14,8 +14,6 @@ A **Legal System** is a system in which rules are defined ([legislature](https:/ ...@@ -14,8 +14,6 @@ A **Legal System** is a system in which rules are defined ([legislature](https:/
The %%Jurisdictions pattern|pattern-jurisdiction%% provides an overview of how this concept fits in with related concepts. The %%Jurisdictions pattern|pattern-jurisdiction%% provides an overview of how this concept fits in with related concepts.
The %%Jurisdictions pattern|pattern-jurisdiction%% provides an overview of how this concept fits in with related concepts.
### Purpose ### Purpose
The ability to distinguish between (non)legal-systems is a very generic enabler to tell which rules (laws, policies, guidelines, etc.) will apply within its %%scope|scope%%, as well as to evaluate the risks that we run when not complying with the rules. Conversely, the %%party|party%% that operates a legal system may provide additional rules to help mitigate such risks. The ability to distinguish between (non)legal-systems is a very generic enabler to tell which rules (laws, policies, guidelines, etc.) will apply within its %%scope|scope%%, as well as to evaluate the risks that we run when not complying with the rules. Conversely, the %%party|party%% that operates a legal system may provide additional rules to help mitigate such risks.
......
...@@ -143,7 +143,9 @@ async function getGlossaryTerms(files) { ...@@ -143,7 +143,9 @@ async function getGlossaryTerms(files) {
// Get the popup text for the term // Get the popup text for the term
let hoverText = await getHoverText(referencePath); let hoverText = await getHoverText(referencePath);
const new_final_url = referencePath.slice(1,-3); const glossary_file_path = path.resolve(process.cwd(), glossaryPath);
const term_path = path.resolve(process.cwd(), TERMS_DIR, reference);
const new_final_url = getRelativePath(glossary_file_path, term_path);
if (hoverText === undefined) { if (hoverText === undefined) {
var new_text = ('<Term reference="' + new_final_url + '">' + var new_text = ('<Term reference="' + new_final_url + '">' +
text + '</Term>'); text + '</Term>');
...@@ -173,7 +175,7 @@ function generateGlossary(data) { ...@@ -173,7 +175,7 @@ function generateGlossary(data) {
let undefineds = ""; let undefineds = "";
data.forEach(item => { data.forEach(item => {
if (item.title !== undefined) { if (item.title !== undefined) {
if (item.hoverText === undefined) { if (item.glossaryText === undefined) {
undefineds = undefineds + `\n- [${item.title}](${item.filepath})\n`; undefineds = undefineds + `\n- [${item.title}](${item.filepath})\n`;
} else { } else {
content = content + `\n\n### **[${item.title}](${item.filepath})**\n${item.glossaryText}\n`; content = content + `\n\n### **[${item.title}](${item.filepath})**\n${item.glossaryText}\n`;
......
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