diff --git a/lib/linker.js b/lib/linker.js index fc9a47a3..58aadbbb 100644 --- a/lib/linker.js +++ b/lib/linker.js @@ -185,7 +185,7 @@ function linkify(paragraphNode, headingNode, termDefs, context, vFile) { const glossUrl = getGlossaryUrl(context, t, vFile); const shortDesc = t.getShortDescription(); return link(glossUrl, shortDesc, - text(j === 0 ? ` (${j})` : `, (${j})`) + html(j === 0 ? `${j+1})` : ` ${j+1})`) ); }) ) diff --git a/test/output-expected/config-tailored/config-glossaries/shared-terms-document.md b/test/output-expected/config-tailored/config-glossaries/shared-terms-document.md index 2528a985..6cb0e5d5 100644 --- a/test/output-expected/config-tailored/config-glossaries/shared-terms-document.md +++ b/test/output-expected/config-tailored/config-glossaries/shared-terms-document.md @@ -1,14 +1,14 @@ # [Two Glossaries A and B with shared set of terms](#two-glossaries-a-and-b-with-shared-set-of-terms) GIVEN there are two glossaries 'Glossary A' AND 'Glossary B' (or more) -AND a shared set of terms '[Term Shared A][1][ (0)][1][, (1)][2]', '[Term Shared B][3][ (0)][3][, (1)][4]' +AND a shared set of terms '[Term Shared A][1][1)][1][ 2)][2]', '[Term Shared B][3][1)][3][ 2)][4]' THEN those terms MUST be linked with both glossaries 'Glossary A' AND 'Glossary B' (or more). ## [Paragraph with two occurrences of a shared term](#paragraph-with-two-occurrences-of-a-shared-term) GIVEN there are two glossaries 'Glossary A' AND 'Glossary B' (or more) -AND a shared term '[Term Shared A][1][ (0)][1][, (1)][2]' -AND term '[Term Shared A][1][ (0)][1][, (1)][2]' is mentioned twice in a paragraph, like this one, +AND a shared term '[Term Shared A][1][1)][1][ 2)][2]' +AND term '[Term Shared A][1][1)][1][ 2)][2]' is mentioned twice in a paragraph, like this one, THEN each occurrence of the term MUST be linked with both glossaries 'Glossary A' AND 'Glossary B'. [1]: shared-terms-glossary-a.md#term-shared-a "'Term Shared A' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'." diff --git a/test/output-expected/config-tailored/config-glossaries/shared-terms-glossary-a.md b/test/output-expected/config-tailored/config-glossaries/shared-terms-glossary-a.md index f126b0d9..b90dff90 100644 --- a/test/output-expected/config-tailored/config-glossaries/shared-terms-glossary-a.md +++ b/test/output-expected/config-tailored/config-glossaries/shared-terms-glossary-a.md @@ -2,11 +2,11 @@ ## [Term Shared A](#term-shared-a) -'[Term Shared A][1][ (0)][1][, (1)][2]' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'. +'[Term Shared A][1][1)][1][ 2)][2]' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'. ## [Term Shared B](#term-shared-b) -'[Term Shared B][3][ (0)][3][, (1)][4]' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'. +'[Term Shared B][3][1)][3][ 2)][4]' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'. [1]: shared-terms-glossary-a.md#term-shared-a "'Term Shared A' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'." diff --git a/test/output-expected/config-tailored/config-glossaries/shared-terms-glossary-b.md b/test/output-expected/config-tailored/config-glossaries/shared-terms-glossary-b.md index 93b0124e..2b381602 100644 --- a/test/output-expected/config-tailored/config-glossaries/shared-terms-glossary-b.md +++ b/test/output-expected/config-tailored/config-glossaries/shared-terms-glossary-b.md @@ -2,11 +2,11 @@ ## [Term Shared A](#term-shared-a) -'[Term Shared A][1][ (0)][1][, (1)][2]' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'. +'[Term Shared A][1][1)][1][ 2)][2]' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'. ## [Term Shared B](#term-shared-b) -'[Term Shared B][3][ (0)][3][, (1)][4]' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'. +'[Term Shared B][3][1)][3][ 2)][4]' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'. [1]: shared-terms-glossary-a.md#term-shared-a "'Term Shared A' MUST be linked WITH both glossaries 'Glossary A' AND 'Glossary B'." diff --git a/test/output-expected/config-tailored/config-indexFile/multiple-glossaries/document.md b/test/output-expected/config-tailored/config-indexFile/multiple-glossaries/document.md index f011156b..15438051 100644 --- a/test/output-expected/config-tailored/config-indexFile/multiple-glossaries/document.md +++ b/test/output-expected/config-tailored/config-indexFile/multiple-glossaries/document.md @@ -9,7 +9,7 @@ AND the index MUST contain links to the correct glossary. ## [Shared set of terms](#shared-set-of-terms) -GIVEN term '[In Glossary A and B][3][ (0)][3][, (1)][4]' +GIVEN term '[In Glossary A and B][3][1)][3][ 2)][4]' AND the term is defined in both glossaries THEN the index MUST contain the term only once AND link to both glossaries