From f94c06fc3ca31b5dd633169a9ac428c0120b3204 Mon Sep 17 00:00:00 2001 From: Andreas Martin <6525873+about-code@users.noreply.github.com> Date: Tue, 21 Sep 2021 20:25:19 +0200 Subject: [PATCH] chore(test): New test cases. (#182) * Fix inconcistencies around linking.byReferenceDefinition * Update docs * Wording * test: New test case. * test: New baseline. * Code style --- README.md | 8 +- lib/identifier.js | 2 +- md/README.md | 7 +- .../documents/document-a.md | 21 +++++ .../documents/document-b.md | 22 +++++ .../glossaries/glossary-a.md | 5 + .../glossaries/glossary-b.md | 5 + .../glossarify-md.conf.json | 10 ++ .../none/glossarify-md.conf.json | 22 +++++ .../none/glossary.md | 5 + .../none/sub-1/document.md | 64 +++++++++++++ .../documents/document-a.md | 29 ++++++ .../documents/document-b.md | 29 ++++++ .../glossaries/glossary-a.md | 5 + .../glossaries/glossary-b.md | 5 + .../glossarify-md.conf.json | 10 ++ .../none/figures.md | 9 ++ .../paths-relative-pathComponents/none/foo.md | 9 ++ .../none/glossarify-md.conf.json | 22 +++++ .../none/glossary.md | 7 ++ .../none/sub-1/document.md | 70 ++++++++++++++ .../none/tables.md | 9 ++ test/package.json | 94 ++++++++++--------- 23 files changed, 416 insertions(+), 53 deletions(-) create mode 100644 test/input/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md create mode 100644 test/input/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md create mode 100644 test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md create mode 100644 test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md create mode 100644 test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json create mode 100644 test/input/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json create mode 100644 test/input/config-linking/paths-relative-pathComponents/none/glossary.md create mode 100644 test/input/config-linking/paths-relative-pathComponents/none/sub-1/document.md create mode 100644 test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md create mode 100644 test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md create mode 100644 test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md create mode 100644 test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md create mode 100644 test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json create mode 100644 test/output-expected/config-linking/paths-relative-pathComponents/none/figures.md create mode 100644 test/output-expected/config-linking/paths-relative-pathComponents/none/foo.md create mode 100644 test/output-expected/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json create mode 100644 test/output-expected/config-linking/paths-relative-pathComponents/none/glossary.md create mode 100644 test/output-expected/config-linking/paths-relative-pathComponents/none/sub-1/document.md create mode 100644 test/output-expected/config-linking/paths-relative-pathComponents/none/tables.md diff --git a/README.md b/README.md index 9d318abc..965faafc 100644 --- a/README.md +++ b/README.md @@ -1006,9 +1006,9 @@ Whether to convert inline-links to [link reference definitions] (size-efficient) - **Default:** `true` - **Since:** v6.0.0 -Whether to linkify headings. Note that some Markdown-to-HTML renderers need headings to be linkified in order to be rendered URL-addressable and navigable. Others like [pandoc] don't care about linkification but presence of additional syntax. +Whether to linkify headings. Note that some Markdown-to-HTML renderers need headings to be linkified in order to be rendered URL-addressable and navigable. Others like [pandoc] don't need linkified headings but special syntax. -See also +See also: - [`linking.headingIdPandoc`](#linkingheadingidpandoc) @@ -1028,7 +1028,7 @@ Use this option to select markdown heading depths which should be considered ter - **Default:** `"github"` - **Since:** v6.0.0 -Algorithm to use for generating heading identifiers (slugs). `"github"` will only guarantee *unique-per file* IDs. The MD5 and SHA256 options will make [glossarify-md] calculate a hash over file path and heading phrase. So they are able to guarantee *unique-in-fileset* IDs given that a particular heading phrase occurs *once only* within a file. For brevity the `*-7` options truncate hashes to a maximum length of 7. They will still be unlikely to collide in a typical project. You'll need *unique-in-fileset* IDs if plan on concatenating output files, e.g. with [pandoc]. Otherwise links in the final result aren't guaranteed to reference the correct target anymore. +Algorithm to use for generating heading identifiers (slugs). `"github"` will only guarantee *unique-per file* IDs. The MD5 and SHA256 options will make [glossarify-md] calculate a hash over file path and heading phrase. So they are able to guarantee *unique-in-fileset* IDs given that a particular heading phrase occurs *once only* within a file. For brevity the `*-7` options truncate hashes to a maximum length of 7. They will still be unlikely to collide in a typical project. You'll need *unique-in-fileset* IDs if you plan on concatenating output files, e.g. with [pandoc]. Otherwise links in the final result aren't guaranteed to reference the correct target anymore. #### `linking.headingIdPandoc` @@ -1090,6 +1090,8 @@ Allows to tweak which components of a file path should make it into auto-generat - `["path", "file"]` => `./glossary/default#term` - `["file"]` => `default#term` +Use `linking.paths: "none"` if you would like to have a fragment (`#`) but no path components. + #### `outDir` - **Range:** `string` diff --git a/lib/identifier.js b/lib/identifier.js index 7a487f61..810f377d 100644 --- a/lib/identifier.js +++ b/lib/identifier.js @@ -10,7 +10,7 @@ import { getVFilePath } from "./path/tools.js"; * * @param {{ algorithm: string }} args Algorithm */ -export function identifier (args) { +export function identifier(args) { const slugs = new BananaSlug(); const algorithm = /^([a-zA-Z0-9]+)-?([0-9]{0,4})$/.exec(args.algorithm); return (tree, vFile) => { diff --git a/md/README.md b/md/README.md index 27685ed3..e24eef22 100644 --- a/md/README.md +++ b/md/README.md @@ -960,9 +960,9 @@ Whether to convert inline-links to [link reference definitions] (size-efficient) - **Default:** `true` - **Since:** v6.0.0 -Whether to linkify headings. Note that some Markdown-to-HTML renderers need headings to be linkified in order to be rendered URL-addressable and navigable. Others like [pandoc] don't care about linkification but presence of additional syntax. +Whether to linkify headings. Note that some Markdown-to-HTML renderers need headings to be linkified in order to be rendered URL-addressable and navigable. Others like [pandoc] don't need linkified headings but special syntax. -See also +See also: - [`linking.headingIdPandoc`](#linkingheadingidpandoc) @@ -983,7 +983,7 @@ Use this option to select markdown heading depths which should be considered ter - **Default:** `"github"` - **Since:** v6.0.0 -Algorithm to use for generating heading identifiers (slugs). `"github"` will only guarantee *unique-per file* IDs. The MD5 and SHA256 options will make [glossarify-md] calculate a hash over file path and heading phrase. So they are able to guarantee *unique-in-fileset* IDs given that a particular heading phrase occurs *once only* within a file. For brevity the `*-7` options truncate hashes to a maximum length of 7. They will still be unlikely to collide in a typical project. You'll need *unique-in-fileset* IDs if plan on concatenating output files, e.g. with [pandoc]. Otherwise links in the final result aren't guaranteed to reference the correct target anymore. +Algorithm to use for generating heading identifiers (slugs). `"github"` will only guarantee *unique-per file* IDs. The MD5 and SHA256 options will make [glossarify-md] calculate a hash over file path and heading phrase. So they are able to guarantee *unique-in-fileset* IDs given that a particular heading phrase occurs *once only* within a file. For brevity the `*-7` options truncate hashes to a maximum length of 7. They will still be unlikely to collide in a typical project. You'll need *unique-in-fileset* IDs if you plan on concatenating output files, e.g. with [pandoc]. Otherwise links in the final result aren't guaranteed to reference the correct target anymore. #### `linking.headingIdPandoc` @@ -1047,6 +1047,7 @@ Allows to tweak which components of a file path should make it into auto-generat - `["path", "file"]` => `./glossary/default#term` - `["file"]` => `default#term` +Use `linking.paths: "none"` if you would like to have a fragment (`#`) but no path components. #### `outDir` diff --git a/test/input/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md new file mode 100644 index 00000000..7607465f --- /dev/null +++ b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md @@ -0,0 +1,21 @@ +# Document A + +- GIVEN a configuration + + ~~~json + "glossaries": [ + { "file": "./documents/**/document-*.md" }, + { "file": "./glossaries/glossary-a.md", "termHint": "🄰 ${term}" }, + { "file": "./glossaries/glossary-b.md", "termHint": "🄱 ${term}" } + ] + ~~~ + +- AND a set x of glossaries found by glob pattern +- AND a set y of glossaries listed explicitly +- AND both sets x and y being disjunct +- THEN term *Alpha* from Glossary A MUST be linked +- AND term *Heading B* from Document B MUST be linked + +## Heading A + +Heading of Document A. diff --git a/test/input/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md new file mode 100644 index 00000000..b63ce8e5 --- /dev/null +++ b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md @@ -0,0 +1,22 @@ +# Document B + +- GIVEN a configuration + + ~~~json + "glossaries": [ + { "file": "./documents/**/document-*.md" }, + { "file": "./glossaries/glossary-a.md", "termHint": "🄰 ${term}" }, + { "file": "./glossaries/glossary-b.md", "termHint": "🄱 ${term}" } + ] + ~~~ + +- AND a set x of glossaries found by glob pattern +- AND a set y of glossaries listed explicitly +- AND both sets x and y being disjunct +- THEN term *Beta* from Glossary B MUST be linked +- AND term *Heading A* from Document A MUST be linked + + +## Heading B + +Heading of Document B. diff --git a/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md new file mode 100644 index 00000000..8a80a9ec --- /dev/null +++ b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md @@ -0,0 +1,5 @@ +# Glossary A + +## Alpha + +Term in Glossary A. diff --git a/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md new file mode 100644 index 00000000..185a4d02 --- /dev/null +++ b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md @@ -0,0 +1,5 @@ +# Glossary B + +## Beta + +Term in Glossary B. diff --git a/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json new file mode 100644 index 00000000..da6418bb --- /dev/null +++ b/test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/file-glob-and-glossaries-disjunct", + "glossaries": [ + { "file": "./documents/**/document-*.md" }, + { "file": "./glossaries/glossary-a.md", "termHint": "🄰 ${term}" }, + { "file": "./glossaries/glossary-b.md", "termHint": "🄱 ${term}" } + ] +} diff --git a/test/input/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json b/test/input/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json new file mode 100644 index 00000000..0257ea35 --- /dev/null +++ b/test/input/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json @@ -0,0 +1,22 @@ +{ + "$schema": "../../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../../output-actual/config-linking/paths-relative-pathComponents/none", + "linking": { + "paths": "relative", + "pathComponents": [] + }, + "generateFiles": { + "listOfTables": { + "file": "./tables.md" + }, + "listOfFigures": { + "file": "./figures.md" + }, + "listOf": [{ + "class": "foo", + "file": "./foo.md" + }] + }, + "glossaries": [{ "file": "./glossary.md" } ] +} diff --git a/test/input/config-linking/paths-relative-pathComponents/none/glossary.md b/test/input/config-linking/paths-relative-pathComponents/none/glossary.md new file mode 100644 index 00000000..a5a21ebd --- /dev/null +++ b/test/input/config-linking/paths-relative-pathComponents/none/glossary.md @@ -0,0 +1,5 @@ +# Glossary + +## Term + +Term definition. diff --git a/test/input/config-linking/paths-relative-pathComponents/none/sub-1/document.md b/test/input/config-linking/paths-relative-pathComponents/none/sub-1/document.md new file mode 100644 index 00000000..c9796d06 --- /dev/null +++ b/test/input/config-linking/paths-relative-pathComponents/none/sub-1/document.md @@ -0,0 +1,64 @@ +# Document + +GIVEN a configuration + +~~~json +{ + "linking": { + "paths": "relative", + "pathComponents": [] + }, + "generateFiles": { + "listOfTables": { + "file": "./tables.md" + }, + "listOfFigures": { + "file": "./figures.md" + }, + "listOf": [{ + "class": "foo", + "file": "./foo.md" + }] + }, +} +~~~ + +## Term Links + +...WITH this document mentioning glossary term *Term* +THEN the term must be linked +AND the link url MUST be `../glossary.md#Term` + +## List Of Tables + +...WITH a configuration `listOfTable` +AND and a table + +*A table:* + +| Head 1 | Head 2 | +| ------ | ------ | +| Item 1 | Item 2 | + +THEN a file `./tables.md` MUST be generated +AND there MUST be a list item with caption *A table:* +AND the list item must be linked +AND the link MUST be `./sub-1/document.md#a-table`. + +## List Of Figures + +...WITH a configuration `listOfFigure` +AND and a figure ![My Figure](./not-found.png) +THEN a file `./figures.md` MUST be generated +AND there MUST be a list item with caption *My Figure* +AND the list item must be linked +AND the link MUST be `./sub-1/document.md#my-figure`. + +## List Of Foo + +...WITH a configuration `listOfFigure` +AND and a Foo +THEN a file `./foo.md` MUST be generated +AND there MUST be a list item with caption *Foo* +AND the list item must be linked +AND the link MUST be `./sub-1/document.md#foo-bar`. diff --git a/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md new file mode 100644 index 00000000..004433ef --- /dev/null +++ b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md @@ -0,0 +1,29 @@ +# [Document A](#document-a) + +* GIVEN a configuration + + ```json + "glossaries": [ + { "file": "./documents/**/document-*.md" }, + { "file": "./glossaries/glossary-a.md", "termHint": "🄰 ${term}" }, + { "file": "./glossaries/glossary-b.md", "termHint": "🄱 ${term}" } + ] + ``` + +* AND a set x of glossaries found by glob pattern + +* AND a set y of glossaries listed explicitly + +* AND both sets x and y being disjunct + +* THEN term *[🄰 Alpha][1]* from Glossary A MUST be linked + +* AND term *[Heading B][2]* from Document B MUST be linked + +## [Heading A](#heading-a) + +Heading of Document A. + +[1]: ../glossaries/glossary-a.md#alpha "Term in Glossary A." + +[2]: ./document-b.md#heading-b "Heading of Document B." diff --git a/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md new file mode 100644 index 00000000..de4c7cd3 --- /dev/null +++ b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md @@ -0,0 +1,29 @@ +# [Document B](#document-b) + +* GIVEN a configuration + + ```json + "glossaries": [ + { "file": "./documents/**/document-*.md" }, + { "file": "./glossaries/glossary-a.md", "termHint": "🄰 ${term}" }, + { "file": "./glossaries/glossary-b.md", "termHint": "🄱 ${term}" } + ] + ``` + +* AND a set x of glossaries found by glob pattern + +* AND a set y of glossaries listed explicitly + +* AND both sets x and y being disjunct + +* THEN term *[🄱 Beta][1]* from Glossary B MUST be linked + +* AND term *[Heading A][2]* from Document A MUST be linked + +## [Heading B](#heading-b) + +Heading of Document B. + +[1]: ../glossaries/glossary-b.md#beta "Term in Glossary B." + +[2]: ./document-a.md#heading-a "Heading of Document A." diff --git a/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md new file mode 100644 index 00000000..7d628bab --- /dev/null +++ b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md @@ -0,0 +1,5 @@ +# [Glossary A](#glossary-a) + +## [Alpha](#alpha) + +Term in Glossary A. diff --git a/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md new file mode 100644 index 00000000..58352fa1 --- /dev/null +++ b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md @@ -0,0 +1,5 @@ +# [Glossary B](#glossary-b) + +## [Beta](#beta) + +Term in Glossary B. diff --git a/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json new file mode 100644 index 00000000..da6418bb --- /dev/null +++ b/test/output-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../output-actual/config-glossaries/file-glob-and-glossaries-disjunct", + "glossaries": [ + { "file": "./documents/**/document-*.md" }, + { "file": "./glossaries/glossary-a.md", "termHint": "🄰 ${term}" }, + { "file": "./glossaries/glossary-b.md", "termHint": "🄱 ${term}" } + ] +} diff --git a/test/output-expected/config-linking/paths-relative-pathComponents/none/figures.md b/test/output-expected/config-linking/paths-relative-pathComponents/none/figures.md new file mode 100644 index 00000000..e317fa68 --- /dev/null +++ b/test/output-expected/config-linking/paths-relative-pathComponents/none/figures.md @@ -0,0 +1,9 @@ +# [Figures](#figures) + + +### [List Of Figures](#list-of-figures) + +1. [My Figure][1] + + +[1]: ./sub-1/document.md#my-figure "My Figure" diff --git a/test/output-expected/config-linking/paths-relative-pathComponents/none/foo.md b/test/output-expected/config-linking/paths-relative-pathComponents/none/foo.md new file mode 100644 index 00000000..204c4d3f --- /dev/null +++ b/test/output-expected/config-linking/paths-relative-pathComponents/none/foo.md @@ -0,0 +1,9 @@ +# [Foo](#foo) + + +### [List Of Foo](#list-of-foo) + +1. [Foo][1] + + +[1]: ./sub-1/document.md#foo-bar "Foo" diff --git a/test/output-expected/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json b/test/output-expected/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json new file mode 100644 index 00000000..0257ea35 --- /dev/null +++ b/test/output-expected/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json @@ -0,0 +1,22 @@ +{ + "$schema": "../../../../../conf/v5/schema.json", + "baseDir": ".", + "outDir": "../../../../output-actual/config-linking/paths-relative-pathComponents/none", + "linking": { + "paths": "relative", + "pathComponents": [] + }, + "generateFiles": { + "listOfTables": { + "file": "./tables.md" + }, + "listOfFigures": { + "file": "./figures.md" + }, + "listOf": [{ + "class": "foo", + "file": "./foo.md" + }] + }, + "glossaries": [{ "file": "./glossary.md" } ] +} diff --git a/test/output-expected/config-linking/paths-relative-pathComponents/none/glossary.md b/test/output-expected/config-linking/paths-relative-pathComponents/none/glossary.md new file mode 100644 index 00000000..7719d965 --- /dev/null +++ b/test/output-expected/config-linking/paths-relative-pathComponents/none/glossary.md @@ -0,0 +1,7 @@ +# [Glossary](#glossary) + +## [Term](#term) + +[Term][1] definition. + +[1]: #term "Term definition." diff --git a/test/output-expected/config-linking/paths-relative-pathComponents/none/sub-1/document.md b/test/output-expected/config-linking/paths-relative-pathComponents/none/sub-1/document.md new file mode 100644 index 00000000..ed9baad9 --- /dev/null +++ b/test/output-expected/config-linking/paths-relative-pathComponents/none/sub-1/document.md @@ -0,0 +1,70 @@ +# [Document](#document) + +GIVEN a configuration + +```json +{ + "linking": { + "paths": "relative", + "pathComponents": [] + }, + "generateFiles": { + "listOfTables": { + "file": "./tables.md" + }, + "listOfFigures": { + "file": "./figures.md" + }, + "listOf": [{ + "class": "foo", + "file": "./foo.md" + }] + }, +} +``` + +## [Term Links](#term-links) + +...WITH this document mentioning glossary term *[Term][1]* +THEN the term must be linked +AND the link url MUST be `../glossary.md#Term` + +## [List Of Tables](#list-of-tables) + +...WITH a configuration `listOfTable` +AND and a table + +*A table:* + + + +| Head 1 | Head 2 | +| ------ | ------ | +| Item 1 | Item 2 | + +THEN a file `./tables.md` MUST be generated +AND there MUST be a list item with caption *A table:* +AND the list item must be linked +AND the link MUST be `./sub-1/document.md#a-table`. + +## [List Of Figures](#list-of-figures) + +...WITH a configuration `listOfFigure` +AND and a figure ![My Figure][2] +THEN a file `./figures.md` MUST be generated +AND there MUST be a list item with caption *My Figure* +AND the list item must be linked +AND the link MUST be `./sub-1/document.md#my-figure`. + +## [List Of Foo](#list-of-foo) + +...WITH a configuration `listOfFigure` +AND and a Foo +THEN a file `./foo.md` MUST be generated +AND there MUST be a list item with caption *Foo* +AND the list item must be linked +AND the link MUST be `./sub-1/document.md#foo-bar`. + +[1]: ../glossary.md#term "Term definition." + +[2]: ./not-found.png diff --git a/test/output-expected/config-linking/paths-relative-pathComponents/none/tables.md b/test/output-expected/config-linking/paths-relative-pathComponents/none/tables.md new file mode 100644 index 00000000..38baec5a --- /dev/null +++ b/test/output-expected/config-linking/paths-relative-pathComponents/none/tables.md @@ -0,0 +1,9 @@ +# [Tables](#tables) + + +### [List Of Tables](#list-of-tables) + +1. [A table][1] + + +[1]: ./sub-1/document.md#a-table "A table" diff --git a/test/package.json b/test/package.json index 5a124094..6f686648 100644 --- a/test/package.json +++ b/test/package.json @@ -60,52 +60,54 @@ "test_28": "node . --config ./input/config-glossaries/file-paths/glossarify-md.conf.json", "test_29": "node . --config ./input/config-glossaries/file-glob/glossarify-md.conf.json", "test_30": "node . --config ./input/config-glossaries/file-glob-and-index/glossarify-md.conf.json", - "test_31": "node . --config ./input/config-glossaries/sort-default/glossarify-md.conf.json", - "test_32": "node . --config ./input/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json", - "test_33": "node . --config ./input/config-glossaries/sort-i18n-de/glossarify-md.conf.json", - "test_34": "node . --config ./input/config-linking/headingDepths-2-4/glossarify-md.conf.json", - "test_35": "node . --config ./input/config-linking/baseUrl/glossarify-md.conf.json", - "test_36": "node . --config ./input/config-linking/byReferenceDefinition/false/glossarify-md.conf.json", - "test_37": "node . --config ./input/config-linking/headingIdAlgorithm/md5/ambiguous-term/glossarify-md.conf.json", - "test_38": "node . --config ./input/config-linking/headingIdAlgorithm/md5-7/glossarify-md.conf.json", - "test_39": "node . --config ./input/config-linking/headingAsLink/false/glossarify-md.conf.json", - "test_40": "node . --config ./input/config-linking/headingIdPandoc/true/glossarify-md.conf.json", - "test_41": "node . --config ./input/config-linking/limitByAlternatives/positive/glossarify-md.conf.json", - "test_42": "node . --config ./input/config-linking/limitByAlternatives/negative/glossarify-md.conf.json", - "test_43": "node . --config ./input/config-linking/limitByAlternatives/zero/glossarify-md.conf.json", - "test_44": "node . --config ./input/config-linking/mentions-first-in-paragraph/glossarify-md.conf.json", - "test_45": "node . --config ./input/config-linking/paths-none/glossarify-md.conf.json", - "test_46": "node . --config ./input/config-linking/paths-relative/glossarify-md.conf.json", - "test_47": "node . --config ./input/config-linking/paths-absolute-baseUrl/glossarify-md.conf.json", - "test_48": "node . --config ./input/config-linking/paths-absolute-baseUrl-slash/glossarify-md.conf.json", - "test_49": "node . --config ./input/config-linking/paths-absolute-pathComponents/path/glossarify-md.conf.json", - "test_50": "node . --config ./input/config-linking/paths-absolute-pathComponents/path-file/glossarify-md.conf.json", - "test_51": "node . --config ./input/config-linking/paths-absolute-pathComponents/path-file-ext/glossarify-md.conf.json", - "test_52": "node . --config ./input/config-linking/paths-relative-pathComponents/path/glossarify-md.conf.json", - "test_53": "node . --config ./input/config-linking/paths-relative-pathComponents/path-file/glossarify-md.conf.json", - "test_54": "node . --config ./input/config-linking/paths-relative-pathComponents/path-file-ext/glossarify-md.conf.json", - "test_55": "node . --config ./input/config-indexFile/glossary-in-subdir/glossarify-md.conf.json", - "test_56": "node . --config ./input/config-indexFile/index-in-subdir/glossarify-md.conf.json", - "test_57": "node . --config ./input/config-indexFile/term-link-to-section/glossarify-md.conf.json", - "test_58": "node . --config ./input/config-indexFile/multiple-glossaries/glossarify-md.conf.json", - "test_59": "node . --config ./input/config-indexFile/config-title/glossarify-md.conf.json", - "test_60": "node . --config ./input/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json", - "test_61": "node . --config ./input/config-indexFiles/flat-dir/glossarify-md.conf.json", - "test_62": "node . --config ./input/config-indexFiles/154-deep-dir/glossarify-md.conf.json", - "test_63": "node . --config ./input/term-count-occurrences/glossarify-md.conf.json", - "test_64": "node . --config ./input/config-listOfFigures/image-reference/glossarify-md.conf.json", - "test_65": "node . --config ./input/config-listOfFigures/option-title-missing/glossarify-md.conf.json", - "test_66": "node . --config ./input/config-listOfFigures/option-with-listOf-combined/glossarify-md.conf.json", - "test_67": "node . --config ./input/config-listOfTables/glossarify-md.conf.json", - "test_68": "node . --config ./input/config-listOf/basic/glossarify-md.conf.json", - "test_69": "node . --config ./input/config-listOf/pattern-tc1-text-paragraph/glossarify-md.conf.json", - "test_70": "node . --config ./input/config-listOf/pattern-tc2-formatted-paragraph/glossarify-md.conf.json", - "test_71": "node . --config ./input/config-listOf/pattern-tc3-title-capture-group/glossarify-md.conf.json", - "test_72": "node . --config ./input/config-listOf/pattern-tc4-sanitization/glossarify-md.conf.json", - "test_73": "node . --config ./input/config-unified/internal/glossarify-md.conf.json", - "test_74": "node . --config ./input/config-unified/external/glossarify-md.conf.json", - "test_75": "node . --config ./input/pandoc/config-linking/headingIdPandoc/glossarify-md.conf.json", - "test_76": "node . --config ./input/pandoc/config-linking/headingIdAlgorithm/mixed-with-pandoc-ids/glossarify-md.conf.json", + "test_31": "node . --config ./input/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json", + "test_32": "node . --config ./input/config-glossaries/sort-default/glossarify-md.conf.json", + "test_33": "node . --config ./input/config-glossaries/sort-i18n-compare-numeric/glossarify-md.conf.json", + "test_34": "node . --config ./input/config-glossaries/sort-i18n-de/glossarify-md.conf.json", + "test_35": "node . --config ./input/config-linking/headingDepths-2-4/glossarify-md.conf.json", + "test_36": "node . --config ./input/config-linking/baseUrl/glossarify-md.conf.json", + "test_37": "node . --config ./input/config-linking/byReferenceDefinition/false/glossarify-md.conf.json", + "test_38": "node . --config ./input/config-linking/headingIdAlgorithm/md5/ambiguous-term/glossarify-md.conf.json", + "test_39": "node . --config ./input/config-linking/headingIdAlgorithm/md5-7/glossarify-md.conf.json", + "test_40": "node . --config ./input/config-linking/headingAsLink/false/glossarify-md.conf.json", + "test_41": "node . --config ./input/config-linking/headingIdPandoc/true/glossarify-md.conf.json", + "test_42": "node . --config ./input/config-linking/limitByAlternatives/positive/glossarify-md.conf.json", + "test_43": "node . --config ./input/config-linking/limitByAlternatives/negative/glossarify-md.conf.json", + "test_44": "node . --config ./input/config-linking/limitByAlternatives/zero/glossarify-md.conf.json", + "test_45": "node . --config ./input/config-linking/mentions-first-in-paragraph/glossarify-md.conf.json", + "test_46": "node . --config ./input/config-linking/paths-none/glossarify-md.conf.json", + "test_47": "node . --config ./input/config-linking/paths-relative/glossarify-md.conf.json", + "test_48": "node . --config ./input/config-linking/paths-absolute-baseUrl/glossarify-md.conf.json", + "test_49": "node . --config ./input/config-linking/paths-absolute-baseUrl-slash/glossarify-md.conf.json", + "test_50": "node . --config ./input/config-linking/paths-absolute-pathComponents/path/glossarify-md.conf.json", + "test_51": "node . --config ./input/config-linking/paths-absolute-pathComponents/path-file/glossarify-md.conf.json", + "test_52": "node . --config ./input/config-linking/paths-absolute-pathComponents/path-file-ext/glossarify-md.conf.json", + "test_53": "node . --config ./input/config-linking/paths-relative-pathComponents/path/glossarify-md.conf.json", + "test_54": "node . --config ./input/config-linking/paths-relative-pathComponents/path-file/glossarify-md.conf.json", + "test_55": "node . --config ./input/config-linking/paths-relative-pathComponents/path-file-ext/glossarify-md.conf.json", + "test_56": "node . --config ./input/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json", + "test_57": "node . --config ./input/config-indexFile/glossary-in-subdir/glossarify-md.conf.json", + "test_58": "node . --config ./input/config-indexFile/index-in-subdir/glossarify-md.conf.json", + "test_59": "node . --config ./input/config-indexFile/term-link-to-section/glossarify-md.conf.json", + "test_60": "node . --config ./input/config-indexFile/multiple-glossaries/glossarify-md.conf.json", + "test_61": "node . --config ./input/config-indexFile/config-title/glossarify-md.conf.json", + "test_62": "node . --config ./input/config-indexFile/issue-75-formatted-headings/glossarify-md.conf.json", + "test_63": "node . --config ./input/config-indexFiles/flat-dir/glossarify-md.conf.json", + "test_64": "node . --config ./input/config-indexFiles/154-deep-dir/glossarify-md.conf.json", + "test_65": "node . --config ./input/term-count-occurrences/glossarify-md.conf.json", + "test_66": "node . --config ./input/config-listOfFigures/image-reference/glossarify-md.conf.json", + "test_67": "node . --config ./input/config-listOfFigures/option-title-missing/glossarify-md.conf.json", + "test_68": "node . --config ./input/config-listOfFigures/option-with-listOf-combined/glossarify-md.conf.json", + "test_69": "node . --config ./input/config-listOfTables/glossarify-md.conf.json", + "test_70": "node . --config ./input/config-listOf/basic/glossarify-md.conf.json", + "test_71": "node . --config ./input/config-listOf/pattern-tc1-text-paragraph/glossarify-md.conf.json", + "test_72": "node . --config ./input/config-listOf/pattern-tc2-formatted-paragraph/glossarify-md.conf.json", + "test_73": "node . --config ./input/config-listOf/pattern-tc3-title-capture-group/glossarify-md.conf.json", + "test_74": "node . --config ./input/config-listOf/pattern-tc4-sanitization/glossarify-md.conf.json", + "test_75": "node . --config ./input/config-unified/internal/glossarify-md.conf.json", + "test_76": "node . --config ./input/config-unified/external/glossarify-md.conf.json", + "test_77": "node . --config ./input/pandoc/config-linking/headingIdPandoc/glossarify-md.conf.json", + "test_78": "node . --config ./input/pandoc/config-linking/headingIdAlgorithm/mixed-with-pandoc-ids/glossarify-md.conf.json", "postsuite": "git diff --minimal --color --no-index --ignore-cr-at-eol ./output-expected ./output-actual | node difftest.js", "postat": "git diff --minimal --color --no-index --ignore-cr-at-eol ./output-expected ./output-actual | node difftest.js", "new-baseline": "rm -r ./output-expected && cp -r ./output-actual ./output-expected",