Skip to content

Commit d1c52a3

Browse files
committed
Add natural-language validation
* Refactor wording in docs to be simpler; * Wrap plug-in, utility, and product names in inline-code; * Wrap function signatures in headings in inline-code.
1 parent 8d6ea30 commit d1c52a3

22 files changed

+227
-180
lines changed

.remarkrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"output": true,
33
"plugins": [
4+
"script/natural-language",
45
"comment-config",
56
"lint",
67
"github",

doc/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ to use asterisks (`*`) or underscores (`_`) for emphasis.
5757

5858
**remark** gets really cool when you combine it with plugins.
5959

60-
* [View available plug-ins and utilities »](https://github.com/wooorm/remark/blob/master/doc/plugins.md)
60+
* [View plug-ins and utilities »](https://github.com/wooorm/remark/blob/master/doc/plugins.md)
6161
* [Read how to use plug-ins in **remarkplugin**(7) »](https://github.com/wooorm/remark/blob/master/doc/remarkplugin.7.md)
6262
* [Read how to create plug-ins in **remarkplugin**(3) »](https://github.com/wooorm/remark/blob/master/doc/remarkplugin.3.md)

doc/plugins.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,126 +19,126 @@ See [tools built with remark »](https://github.com/wooorm/remark/blob/master/do
1919

2020
## List of Plugins
2121

22-
* [ben-eb/remark-autolink-headings](https://github.com/ben-eb/remark-autolink-headings)
22+
* [`ben-eb/remark-autolink-headings`](https://github.com/ben-eb/remark-autolink-headings)
2323
— Automatically add GitHub style links to headings;
2424

25-
* [wooorm/remark-comment-config](https://github.com/wooorm/remark-comment-config)
25+
* [`wooorm/remark-comment-config`](https://github.com/wooorm/remark-comment-config)
2626
— Set settings with comments during runtime;
2727

28-
* [hughsk/remark-contributors](https://github.com/hughsk/remark-contributors)
28+
* [`hughsk/remark-contributors`](https://github.com/hughsk/remark-contributors)
2929
— Inject a given list of contributors into a table in a document;
3030

31-
* [eush77/remark-defsplit](https://github.com/eush77/remark-defsplit)
32-
— Extract inline link/image destinations as separate definitions;
31+
* [`eush77/remark-defsplit`](https://github.com/eush77/remark-defsplit)
32+
— Extract inline link and image destinations as separate definitions;
3333

34-
* [wooorm/remark-github](https://github.com/wooorm/remark-github)
34+
* [`wooorm/remark-github`](https://github.com/wooorm/remark-github)
3535
— Auto-link references like in GitHub issues, PRs, and comments;
3636

37-
* [ben-eb/remark-highlight.js](https://github.com/ben-eb/remark-highlight.js)
37+
* [`ben-eb/remark-highlight.js`](https://github.com/ben-eb/remark-highlight.js)
3838
— Highlight code blocks in Markdown files with
3939
[highlight.js](https://github.com/isagalaev/highlight.js);
4040

41-
* [wooorm/remark-html](https://github.com/wooorm/remark-html)
41+
* [`wooorm/remark-html`](https://github.com/wooorm/remark-html)
4242
— Compile Markdown to HTML documents;
4343

44-
* [wooorm/remark-inline-links](https://github.com/wooorm/remark-inline-links)
44+
* [`wooorm/remark-inline-links`](https://github.com/wooorm/remark-inline-links)
4545
— Transform references and definitions into normal links and images;
4646

47-
* [wooorm/remark-license](https://github.com/wooorm/remark-license)
47+
* [`wooorm/remark-license`](https://github.com/wooorm/remark-license)
4848
— Add a license section;
4949

50-
* [wooorm/remark-lint](https://github.com/wooorm/remark-lint)
50+
* [`wooorm/remark-lint`](https://github.com/wooorm/remark-lint)
5151
— Markdown code style linter;
5252

53-
* [wooorm/remark-man](https://github.com/wooorm/remark-man)
53+
* [`wooorm/remark-man`](https://github.com/wooorm/remark-man)
5454
— Compile Markdown to Man pages (roff);
5555

56-
* [ben-eb/remark-midas](https://github.com/ben-eb/remark-midas)
56+
* [`ben-eb/remark-midas`](https://github.com/ben-eb/remark-midas)
5757
— Highlight CSS in Markdown files with [midas](https://github.com/ben-eb/midas);
5858

59-
* [eush77/remark-normalize-headings](https://github.com/eush77/remark-normalize-headings)
59+
* [`eush77/remark-normalize-headings`](https://github.com/eush77/remark-normalize-headings)
6060
— Make sure there is no more than a single top-level heading in the document
6161

62-
* [wooorm/remark-range](https://github.com/wooorm/remark-range)
62+
* [`wooorm/remark-range`](https://github.com/wooorm/remark-range)
6363
— Add range information;
6464

65-
* [mapbox/remark-react](https://github.com/mapbox/remark-react)
65+
* [`mapbox/remark-react`](https://github.com/mapbox/remark-react)
6666
— Compile Markdown to [React](https://github.com/facebook/react);
6767

68-
* [wooorm/remark-reference-links](https://github.com/wooorm/remark-reference-links)
68+
* [`wooorm/remark-reference-links`](https://github.com/wooorm/remark-reference-links)
6969
— Transform links and images into references and definitions;
7070

71-
* [wooorm/remark-retext](https://github.com/wooorm/remark-retext)
71+
* [`wooorm/remark-retext`](https://github.com/wooorm/remark-retext)
7272
[retext](https://github.com/wooorm/retext) support;
7373

74-
* [wooorm/remark-slug](https://github.com/wooorm/remark-slug)
74+
* [`wooorm/remark-slug`](https://github.com/wooorm/remark-slug)
7575
— Add slugs to headings;
7676

77-
* [wooorm/remark-strip-badges](https://github.com/wooorm/remark-strip-badges)
77+
* [`wooorm/remark-strip-badges`](https://github.com/wooorm/remark-strip-badges)
7878
— Remove badges (such as `shields.io`);
7979

80-
* [eush77/remark-squeeze-paragraphs](https://github.com/eush77/remark-squeeze-paragraphs)
80+
* [`eush77/remark-squeeze-paragraphs`](https://github.com/eush77/remark-squeeze-paragraphs)
8181
— Remove empty paragraphs;
8282

83-
* [denysdovhan/remark-textr](https://github.com/denysdovhan/remark-textr)
84-
[Textr](https://github.com/shuvalov-anton/textr), a modular typographic
83+
* [`denysdovhan/remark-textr`](https://github.com/denysdovhan/remark-textr)
84+
[`Textr`](https://github.com/shuvalov-anton/textr), a modular typographic
8585
framework;
8686

87-
* [wooorm/remark-toc](https://github.com/wooorm/remark-toc)
87+
* [`wooorm/remark-toc`](https://github.com/wooorm/remark-toc)
8888
— Generate a Table of Contents (TOC) for Markdown files;
8989

90-
* [eush77/remark-unlink](https://github.com/eush77/remark-unlink)
90+
* [`eush77/remark-unlink`](https://github.com/eush77/remark-unlink)
9191
— Remove all links, references and definitions;
9292

93-
* [wooorm/remark-usage](https://github.com/wooorm/remark-usage)
93+
* [`wooorm/remark-usage`](https://github.com/wooorm/remark-usage)
9494
— Add a usage example to your readme;
9595

96-
* [wooorm/remark-validate-links](https://github.com/wooorm/remark-validate-links)
96+
* [`wooorm/remark-validate-links`](https://github.com/wooorm/remark-validate-links)
9797
— Validate links point to existing headings and files;
9898

99-
* [wooorm/remark-vdom](https://github.com/wooorm/remark-vdom)
99+
* [`wooorm/remark-vdom`](https://github.com/wooorm/remark-vdom)
100100
— Compile Markdown to [VDOM](https://github.com/Matt-Esch/virtual-dom/);
101101

102-
* [wooorm/remark-yaml](https://github.com/wooorm/remark-yaml)
102+
* [`wooorm/remark-yaml`](https://github.com/wooorm/remark-yaml)
103103
— Parse and stringify YAML code blocks;
104104

105-
* [wooorm/remark-yaml-config](https://github.com/wooorm/remark-yaml-config)
105+
* [`wooorm/remark-yaml-config`](https://github.com/wooorm/remark-yaml-config)
106106
— Set settings with YAML during runtime;
107107

108108
## List of Utilities
109109

110110
Although not **remark** plug-ins, the following projects are useful when
111111
working with the AST ([**mdast**](https://github.com/wooorm/mdast)):
112112

113-
* [wooorm/mdast-util-definitions](https://github.com/wooorm/mdast-util-definitions)
113+
* [`wooorm/mdast-util-definitions`](https://github.com/wooorm/mdast-util-definitions)
114114
— Find definition nodes;
115115

116-
* [wooorm/mdast-util-escape](https://github.com/wooorm/mdast-util-escape)
116+
* [`wooorm/mdast-util-escape`](https://github.com/wooorm/mdast-util-escape)
117117
— Escape text to be inserted into a node;
118118

119-
* [wooorm/mdast-util-heading-range](https://github.com/wooorm/mdast-util-heading-range)
119+
* [`wooorm/mdast-util-heading-range`](https://github.com/wooorm/mdast-util-heading-range)
120120
— Markdown heading as ranges;
121121

122-
* [wooorm/mdast-util-heading-style](https://github.com/wooorm/mdast-util-heading-style)
122+
* [`wooorm/mdast-util-heading-style`](https://github.com/wooorm/mdast-util-heading-style)
123123
— Get the style of a heading (`"atx"`, `"atx-closed"`, or `"setext"`);
124124

125-
* [anandthakker/mdast-util-inject](https://github.com/anandthakker/mdast-util-inject)
125+
* [`anandthakker/mdast-util-inject`](https://github.com/anandthakker/mdast-util-inject)
126126
— Inject one AST into another at a specified heading, keeping heading
127127
structure intact;
128128

129-
* [wooorm/mdast-util-position](https://github.com/wooorm/mdast-util-position)
129+
* [`wooorm/mdast-util-position`](https://github.com/wooorm/mdast-util-position)
130130
— Get the position of nodes;
131131

132-
* [wooorm/mdast-util-to-string](https://github.com/wooorm/mdast-util-to-string)
132+
* [`wooorm/mdast-util-to-string`](https://github.com/wooorm/mdast-util-to-string)
133133
— Get the plain text content of a node.
134134

135-
* [eush77/mdast-normalize-headings](https://github.com/eush77/mdast-normalize-headings)
135+
* [`eush77/mdast-normalize-headings`](https://github.com/eush77/mdast-normalize-headings)
136136
— Make sure there is no more than a single top-level heading in the document
137137

138-
* [eush77/mdast-squeeze-paragraphs](https://github.com/eush77/mdast-squeeze-paragraphs)
138+
* [`eush77/mdast-squeeze-paragraphs`](https://github.com/eush77/mdast-squeeze-paragraphs)
139139
— Remove empty paragraphs;
140140

141-
* [wooorm/mdast-zone](https://github.com/wooorm/mdast-zone)
141+
* [`wooorm/mdast-zone`](https://github.com/wooorm/mdast-zone)
142142
— HTML comments as ranges or markers.
143143

144144
In addition, see [`unist`](https://github.com/wooorm/unist#unist-node-utilties)
@@ -164,8 +164,8 @@ It is recommended to publish a plugin as an
164164
[npm module](https://docs.npmjs.com/getting-started/publishing-npm-packages).
165165

166166
You should pick a name prefixed by `"remark-"`, valid examples are
167-
[**remark-toc**](https://www.npmjs.com/package/remark-toc) or
168-
[**remark-yaml-config**](https://www.npmjs.com/package/remark-yaml-config).
167+
[`remark-toc`](https://www.npmjs.com/package/remark-toc) or
168+
[`remark-yaml-config`](https://www.npmjs.com/package/remark-yaml-config).
169169
The reasoning here is that they can be used on the CLI without this prefix,
170170
but can still be meaningful. For example, `lint` was not available, but instead
171171
of opting for `liiint` or some other weird form, using `remark-lint` ensured a

doc/products.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,35 @@ for a list of plugins and utilities.
1313

1414
### Apps
1515

16-
* [minodisk/markn](https://github.com/minodisk/markn)
16+
* [`minodisk/markn`](https://github.com/minodisk/markn)
1717
— Lightweight markdown viewer.
1818

19-
* [rhysd/Shiba](https://github.com/rhysd/Shiba)
19+
* [`rhysd/Shiba`](https://github.com/rhysd/Shiba)
2020
— Live markdown previewer with linter;
2121

2222
### CLI
2323

24-
* [wooorm/alex](https://github.com/wooorm/alex)
24+
* [`wooorm/alex`](https://github.com/wooorm/alex)
2525
— Catch insensitive, inconsiderate writing;
2626

27-
* [hughsk/contributor-table](https://github.com/hughsk/contributor-table)
27+
* [`hughsk/contributor-table`](https://github.com/hughsk/contributor-table)
2828
— Inject a list of git contributors
2929

30-
* [eush77/github-man](https://github.com/eush77/github-man)
30+
* [`eush77/github-man`](https://github.com/eush77/github-man)
3131
— Open readme from GitHub repository as a man page.
3232

33-
* [man-n/man-n](https://github.com/man-n/man-n)
33+
* [`man-n/man-n`](https://github.com/man-n/man-n)
3434
— Browse npm with man(1);
3535

36-
* [eush77/npm-man](https://github.com/eush77/npm-man)
36+
* [`eush77/npm-man`](https://github.com/eush77/npm-man)
3737
— Open any package readme from npm as a man page.
3838

39-
* [dthree/wat](https://github.com/dthree/wat)
39+
* [`dthree/wat`](https://github.com/dthree/wat)
4040
— Community-controlled cheat sheets for every coder.
4141

4242
### Atom
4343

44-
* [AtomLinter/linter-markdown](https://github.com/AtomLinter/linter-markdown)
44+
* [`AtomLinter/linter-markdown`](https://github.com/AtomLinter/linter-markdown)
4545
— Lint markdown files within atom;
4646

4747
* [ZotPlus/zotero-citations](https://github.com/ZotPlus/zotero-citations)

doc/remark.3.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ var doc = processor.process([
2424

2525
## DESCRIPTION
2626

27-
This is the application programming interface documentation for **remark**.
27+
These are the docs for the application programming interface of **remark**.
2828
To find documentation for the command line interface, see **remark**(1).
2929

30-
## remark.use(plugin\[, options])
30+
## `remark.use(plugin[, options])`
3131

3232
Change the way **remark** works by using a plugin. Plugins are documented
33-
at <https://github.com/wooorm/remark/blob/master/doc/plugins.md>.
33+
at on GitHub.
3434

3535
**Signatures**
3636

@@ -49,7 +49,7 @@ at <https://github.com/wooorm/remark/blob/master/doc/plugins.md>.
4949
**remark** object itself (it has the same methods), but caches the `use`d
5050
plugins.
5151

52-
## remark.parse(file\[, options])
52+
## `remark.parse(file[, options])`
5353

5454
Parse a markdown document into an **mdast** node.
5555

@@ -67,7 +67,7 @@ Parse a markdown document into an **mdast** node.
6767

6868
`Node` — Node. Nodes are documented at **mdast**.
6969

70-
## remark.run(node\[, file]\[, done])
70+
## `remark.run(node[, file][, done])`
7171

7272
Transform a node by applying plug-ins to it. Either a node or a file which
7373
was previously passed to `parse()`, must be given.
@@ -96,7 +96,7 @@ was previously passed to `parse()`, must be given.
9696

9797
When no `node` was given and no node was found on the file.
9898

99-
### function done(err, node, file)
99+
### `function done(err, node, file)`
100100

101101
Invoked when transformation is complete.
102102

@@ -111,7 +111,7 @@ Invoked when transformation is complete.
111111
* `node` (`Node`) — Transformed node;
112112
* `file` (`File`) — File object representing the input file;
113113

114-
## remark.stringify(node\[, file]\[, options])
114+
## `remark.stringify(node[, file][, options])`
115115

116116
Compile a node into a document.
117117

@@ -135,7 +135,7 @@ Compile a node into a document.
135135

136136
When no `node` was given and no node was found on the file.
137137

138-
## remark.process(file\[, options]\[, done])
138+
## `remark.process(file[, options][, done])`
139139

140140
Parse, transform, and compile markdown into something else.
141141

@@ -156,7 +156,7 @@ Parse, transform, and compile markdown into something else.
156156
asynchronous generates. When an async transformer is used, `null` is
157157
returned and `done` must be given to receive the results upon completion.
158158

159-
### function done(err?, doc?, file?)
159+
### `function done(err[, doc[, file]])`
160160

161161
Invoked when processing is complete.
162162

@@ -171,15 +171,15 @@ Invoked when processing is complete.
171171
* `doc` (`string`) — Document generated by the process;
172172
* `file` (`File`) — File object representing the input file;
173173

174-
## FileSet()
174+
## `FileSet()`
175175

176176
**remark**(1) compiles multiple files using a `FileSet` instance. This set
177177
is exposed to plug-ins as an argument to the attacher. `FileSet`s
178178
should not be created by plug-ins.
179179

180-
## fileSet.valueOf()
180+
## `fileSet.valueOf()`
181181

182-
## fileSet.toJSON()
182+
## `fileSet.toJSON()`
183183

184184
Get access to the file objects in a set.
185185

@@ -191,7 +191,7 @@ Get access to the file objects in a set.
191191

192192
`Array.<File>` — List of files being processed by **remark**(1).
193193

194-
## fileSet.use(completer)
194+
## `fileSet.use(completer)`
195195

196196
Add a completer to the middleware pipeline of a file-set. When all
197197
files are transformed, this pipeline is run and `completer` is invoked
@@ -205,7 +205,7 @@ with `fileSet`.
205205

206206
* `completer` (`Function`).
207207

208-
## fileSet.add(file|filePath)
208+
## `fileSet.add(file | filePath)`
209209

210210
Add a new file to be processed by **remark**(1). The given file is
211211
processed just like other files, with a few differences.

doc/remarkconfig.7.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* **remark**(1) additionally accepts configuration through a `settings`
1818
key in **remarkrc**(5) configuration files;
1919

20-
* Plug-ins can configure **remark**, for example, **remark-yaml-config**
21-
allows per-file configuration to be set through YAML front-matter.
20+
* Plug-ins can configure **remark**. For example, `remark-yaml-config`
21+
allows configuration to be set through YAML front-matter.
2222

2323
For a list of available configuration settings, see **remarksetting**(7).
2424

doc/remarkignore.5.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ Each line in a **remarkignore**(5) file provides a pattern which describes to
2828
* Lines which start with a interrogation-mark (`!`) negate, thus re-adding
2929
a previously ignored file path;
3030

31-
For documentation regarding the glob engine itself, such as wild-cards
32-
(`*`, `?`), brace expressions (`{one,two}`), see
33-
[isaacs/minimatch](https://github.com/isaacs/minimatch).
31+
For documentation regarding support of wild-cards (`*`, `?`), brace
32+
expressions (`{one,two}`), and more, see [`minimatch`](https://github.com/isaacs/minimatch).
3433

3534
You can pass a **gitignore**(5) file to **remark**(1), because it has the same
3635
format as **remarkignore**(5):

0 commit comments

Comments
 (0)