Skip to content

Commit

Permalink
feat: Rename option linking.byReference to `linking.byReferenceDefi…
Browse files Browse the repository at this point in the history
…nition`. (#174)

* chore: Remove old schema docs before generating new.
  • Loading branch information
about-code authored Sep 12, 2021
1 parent 1a2fdd6 commit 7950a17
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions conf/v5/doc/schema-defs-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ Negative values may also be helpful when using 'glossaries' option with a glob p

* Type: `integer`

## byReference
## byReferenceDefinition

When 'true' replaces markdown inline links with numbered references to a link reference definition list at the bottom of a markdown file. See 'Link Reference Definitions' on <http://commonmark.org>.

`byReference`
`byReferenceDefinition`

* is optional

Expand Down
6 changes: 3 additions & 3 deletions conf/v5/doc/schema-properties-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The default value is:
"headingIdAlgorithm": "github",
"headingIdPandoc": false,
"headingAsLink": true,
"byReference": true,
"byReferenceDefinition": true,
"limitByAlternatives": 10
}
```
Expand Down Expand Up @@ -164,11 +164,11 @@ Negative values may also be helpful when using 'glossaries' option with a glob p

* Type: `integer`

## byReference
## byReferenceDefinition

When 'true' replaces markdown inline links with numbered references to a link reference definition list at the bottom of a markdown file. See 'Link Reference Definitions' on <http://commonmark.org>.

`byReference`
`byReferenceDefinition`

* is optional

Expand Down
6 changes: 3 additions & 3 deletions conf/v5/doc/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ The default value is:
"headingIdAlgorithm": "github",
"headingIdPandoc": false,
"headingAsLink": true,
"byReference": true,
"byReferenceDefinition": true,
"limitByAlternatives": 10
}
```
Expand Down Expand Up @@ -824,11 +824,11 @@ Negative values may also be helpful when using 'glossaries' option with a glob p

* Type: `integer`

### byReference
### byReferenceDefinition

When 'true' replaces markdown inline links with numbered references to a link reference definition list at the bottom of a markdown file. See 'Link Reference Definitions' on <http://commonmark.org>.

`byReference`
`byReferenceDefinition`

* is optional

Expand Down
4 changes: 2 additions & 2 deletions conf/v5/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
,"headingIdAlgorithm": "github"
,"headingIdPandoc": false
,"headingAsLink": true
,"byReference": true
,"byReferenceDefinition": true
,"limitByAlternatives": 10
}
}
Expand Down Expand Up @@ -327,7 +327,7 @@
,"minimum": "-95"
,"maximum": "+95"
}
,"byReference": {
,"byReferenceDefinition": {
"description": "When 'true' replaces markdown inline links with numbered references to a link reference definition list at the bottom of a markdown file. See 'Link Reference Definitions' on http://commonmark.org."
,"type": "boolean"
}
Expand Down
2 changes: 1 addition & 1 deletion lib/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function readDocumentFiles(context) {
.use(linker, { context })
.use(indexer, { context, indexes: [...termsIndexes, ...anchorIndexes ]})
.use(whenTrue(reportNotMentioned || dev.termsFile, counter), { context })
.use(whenTrue(linking.byReference, remark_ref_links))
.use(whenTrue(linking.byReferenceDefinition, remark_ref_links))
.use(whenTrue(linking.headingAsLink, remark_link_headings), {behavior: "wrap"})
.use(whenTrue(linking.headingIdPandoc, pandoc_heading_append_id))
.use(whenTrue(dev.printOutputAst, printAst), { match: dev.printOutputAst })
Expand Down
2 changes: 1 addition & 1 deletion lib/writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function writeMarkdownFile(context, vFile) {
.use(remark_stringify) // compiler
.use(identifier, { algorithm: linking.headingIdAlgorithm })
.use(remark_footnotes, {inlineNotes: true})
.use(whenTrue(linking.byReference, remark_ref_links))
.use(whenTrue(linking.byReferenceDefinition, remark_ref_links))
.use(whenTrue(linking.headingAsLink, remark_link_headings), {behavior: "wrap"})
.use(whenTrue(linking.headingIdPandoc, pandoc_heading_append_id));
processor.data(unifiedConf);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"debug-config": "npm run dconfig",
"docs": "npm-run-all docs-*",
"docs-doc": "node ./bin/index.js --config ./glossarify-md.conf.json",
"docs-config": "jsonschema2md -n -d ./conf/v5 -e json -o ./conf/v5/doc -x - -h=false -s nullablefact -s typesection -s definedinfact -s proptable",
"docs-config": "rm -r ./conf/v5/doc && jsonschema2md -n -d ./conf/v5 -e json -o ./conf/v5/doc -x - -h=false -s nullablefact -s typesection -s definedinfact -s proptable",
"docs-repo": "remark md/README.md > README.md && remark md/CONTRIBUTING.md > CONTRIBUTING.md",
"fix": "eslint . --fix",
"linter": "eslint .",
Expand Down

0 comments on commit 7950a17

Please sign in to comment.