-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix inconcistencies around linking.byReferenceDefinition * Update docs * Wording * test: New test case. * test: New baseline. * Code style
- Loading branch information
1 parent
965c6be
commit f94c06f
Showing
23 changed files
with
416 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...put/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
22 changes: 22 additions & 0 deletions
22
...put/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
5 changes: 5 additions & 0 deletions
5
...ut/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Glossary A | ||
|
||
## Alpha | ||
|
||
Term in Glossary A. |
5 changes: 5 additions & 0 deletions
5
...ut/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Glossary B | ||
|
||
## Beta | ||
|
||
Term in Glossary B. |
10 changes: 10 additions & 0 deletions
10
test/input/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}" } | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
test/input/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } ] | ||
} |
5 changes: 5 additions & 0 deletions
5
test/input/config-linking/paths-relative-pathComponents/none/glossary.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Glossary | ||
|
||
## Term | ||
|
||
Term definition. |
64 changes: 64 additions & 0 deletions
64
test/input/config-linking/paths-relative-pathComponents/none/sub-1/document.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <span id="foo-bar">Foo</span> | ||
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`. |
29 changes: 29 additions & 0 deletions
29
...ted/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-a.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." |
29 changes: 29 additions & 0 deletions
29
...ted/config-glossaries/file-glob-and-glossaries-disjunct/documents/document-b.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." |
5 changes: 5 additions & 0 deletions
5
...ed/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-a.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# [Glossary A](#glossary-a) | ||
|
||
## [Alpha](#alpha) | ||
|
||
Term in Glossary A. |
5 changes: 5 additions & 0 deletions
5
...ed/config-glossaries/file-glob-and-glossaries-disjunct/glossaries/glossary-b.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# [Glossary B](#glossary-b) | ||
|
||
## [Beta](#beta) | ||
|
||
Term in Glossary B. |
10 changes: 10 additions & 0 deletions
10
...tput-expected/config-glossaries/file-glob-and-glossaries-disjunct/glossarify-md.conf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}" } | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
test/output-expected/config-linking/paths-relative-pathComponents/none/figures.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
9 changes: 9 additions & 0 deletions
9
test/output-expected/config-linking/paths-relative-pathComponents/none/foo.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# [Foo](#foo) | ||
|
||
|
||
### [List Of Foo](#list-of-foo) | ||
|
||
1. [Foo][1] | ||
|
||
|
||
[1]: ./sub-1/document.md#foo-bar "Foo" |
22 changes: 22 additions & 0 deletions
22
...output-expected/config-linking/paths-relative-pathComponents/none/glossarify-md.conf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } ] | ||
} |
7 changes: 7 additions & 0 deletions
7
test/output-expected/config-linking/paths-relative-pathComponents/none/glossary.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# [Glossary](#glossary) | ||
|
||
## [Term](#term) | ||
|
||
[Term][1] definition. | ||
|
||
[1]: #term "Term definition." |
Oops, something went wrong.