diff --git a/conf/v5/doc/schema-defs-linking-properties-byreference.md b/conf/v5/doc/schema-defs-linking-properties-byreferencedefinition.md similarity index 100% rename from conf/v5/doc/schema-defs-linking-properties-byreference.md rename to conf/v5/doc/schema-defs-linking-properties-byreferencedefinition.md diff --git a/conf/v5/doc/schema-defs-linking.md b/conf/v5/doc/schema-defs-linking.md index 0cb0a2c7..ba3f1cc5 100644 --- a/conf/v5/doc/schema-defs-linking.md +++ b/conf/v5/doc/schema-defs-linking.md @@ -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 . -`byReference` +`byReferenceDefinition` * is optional diff --git a/conf/v5/doc/schema-properties-linking.md b/conf/v5/doc/schema-properties-linking.md index 17f1abda..e3129c08 100644 --- a/conf/v5/doc/schema-properties-linking.md +++ b/conf/v5/doc/schema-properties-linking.md @@ -22,7 +22,7 @@ The default value is: "headingIdAlgorithm": "github", "headingIdPandoc": false, "headingAsLink": true, - "byReference": true, + "byReferenceDefinition": true, "limitByAlternatives": 10 } ``` @@ -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 . -`byReference` +`byReferenceDefinition` * is optional diff --git a/conf/v5/doc/schema.md b/conf/v5/doc/schema.md index 23091e6a..c49b2e3d 100644 --- a/conf/v5/doc/schema.md +++ b/conf/v5/doc/schema.md @@ -224,7 +224,7 @@ The default value is: "headingIdAlgorithm": "github", "headingIdPandoc": false, "headingAsLink": true, - "byReference": true, + "byReferenceDefinition": true, "limitByAlternatives": 10 } ``` @@ -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 . -`byReference` +`byReferenceDefinition` * is optional diff --git a/conf/v5/schema.json b/conf/v5/schema.json index 91576b0f..b5f2aa78 100644 --- a/conf/v5/schema.json +++ b/conf/v5/schema.json @@ -88,7 +88,7 @@ ,"headingIdAlgorithm": "github" ,"headingIdPandoc": false ,"headingAsLink": true - ,"byReference": true + ,"byReferenceDefinition": true ,"limitByAlternatives": 10 } } @@ -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" } diff --git a/lib/reader.js b/lib/reader.js index 744f07f6..c3c2ae04 100644 --- a/lib/reader.js +++ b/lib/reader.js @@ -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 }) diff --git a/lib/writer.js b/lib/writer.js index 4f1d55dc..113046a5 100644 --- a/lib/writer.js +++ b/lib/writer.js @@ -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); diff --git a/package.json b/package.json index e8b79c46..238a7082 100644 --- a/package.json +++ b/package.json @@ -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 .",