Skip to content

Commit 8f489a3

Browse files
Fix README.md formatting brokenness.
1 parent dc13d22 commit 8f489a3

File tree

2 files changed

+39
-77
lines changed

2 files changed

+39
-77
lines changed

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
HTML2MARKDOWN=html2text
22
PERL=perl
33
PERLFLAGS=
4+
FMT=fmt
5+
FMTFLAGS=-80
46

57
all: README.md
68

79
README.md: index.html
8-
$(HTML2MARKDOWN) $(HTML2MARKDOWNFLAGS) $< > $@
9-
$(PERL) $(PERLFLAGS) -pi -e 'undef $$/;s/Command-line: usage · options \| Web-based: usage · client · options\n//' $@
10-
$(PERL) $(PERLFLAGS) -pi -e 'undef $$/; s/\n\n\n(\n)*/\n\n/g' $@
10+
$(HTML2MARKDOWN) $(HTML2MARKDOWNFLAGS) $< \
11+
| $(PERL) $(PERLFLAGS) -pe 'undef $$/;s/Command-line: usage · options \| Web-based: usage · client · options\n//' \
12+
| $(PERL) $(PERLFLAGS) -pe 'undef $$/; s/(\s+\n)+/\n\n/g' \
13+
| $(PERL) $(PERLFLAGS) -pe 'undef $$/; s/(\n\n\n)+/\n/g' \
14+
| $(FMT) $(FMTFLAGS) \
15+
| $(PERL) $(PERLFLAGS) -pe 'undef $$/; s/ +(\[[0-9]+\]:)\n +/\n $$1 /g' > $@

README.md

Lines changed: 31 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ area at github][3]. The following are instructions on how to use it to validate
66
documents.
77

88
[1]: http://about.validator.nu/
9-
109
[2]: https://github.com/validator/validator.github.io/releases
11-
1210
[3]: https://github.com/validator/validator.github.io/
1311

1412
## Command-line usage
@@ -17,8 +15,7 @@ You can use the `vnu.jar` validator as an executable for command-line validation
1715
of HTML documents by invoking it like this:
1816

1917
java -jar vnu.jar [--html] [--entities] [--schema URL]
20-
21-
[--format gnu|xml|json|text] [--verbose] [--version] FILES
18+
[--format gnu|xml|json|text] [--verbose] [--version] FILES
2219

2320
To validate one or more documents from the command line:
2421

@@ -40,46 +37,32 @@ executable provides the following options:
4037
#### --entities
4138

4239
Specifies that the XML parser must not load remote/external entities (such
43-
44-
as DTDs) from the Internet.
45-
46-
default: [unset; the XML parser will attempt to load external entities]
40+
as DTDs) from the Internet. default: [unset; the XML parser will attempt to
41+
load external entities]
4742

4843
#### --format format
4944

50-
Specifies the output format for validation results.
51-
52-
default: "gnu"
53-
54-
possible values: "gnu", "xml", "json", "text"
55-
56-
see also:
57-
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out][4]
45+
Specifies the output format for validation results. default: "gnu" possible
46+
values: "gnu", "xml", "json", "text" see also:
47+
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out][4]
5848

5949
[4]: http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out
6050

6151
#### --html
6252

6353
Specifies that all documents must be parsed by the HTML parser as text/html
64-
65-
(otherwise, *.xhtml documents are parsed by the XML parser).
66-
67-
default: [unset; *.xhtml documents are parsed by the XML parser]
54+
(otherwise, *.xhtml documents are parsed by the XML parser). default:
55+
[unset; *.xhtml documents are parsed by the XML parser]
6856

6957
#### --schema URL
7058

7159
Specifies a URL for a known http://s.validator.nu/* schema to use for
72-
73-
document validation.
74-
75-
default: http://s.validator.nu/html5-all.rnc
60+
document validation. default: http://s.validator.nu/html5-all.rnc
7661

7762
#### --verbose
7863

79-
Specifies that the validator output should be "verbose". Currently this
80-
81-
just means that the names of files being validated are written to stdout.
82-
64+
Specifies that the validator output should be "verbose". Currently this just
65+
means that the names of files being validated are written to stdout.
8366
default: [unset; output is not verbose]
8467

8568
#### --version
@@ -92,9 +75,7 @@ The `vnu.jar` validator provides a way for you to validate HTML documents over
9275
the Web, in a Web browser, as an HTTP service—just as with
9376
[http://html5.validator.nu/][5] and [http://validator.w3.org/nu/][6].
9477

95-
[5]: http://html5.validator.nu/
96-
97-
[6]: http://validator.w3.org/nu/
78+
[5]: http://html5.validator.nu/ [6]: http://validator.w3.org/nu/
9879

9980
To run the validator as an HTTP service, open a new terminal window and invoke
10081
`vnu.jar` like this:
@@ -119,7 +100,7 @@ locally-running instance of the HTTP service for validation. To validate
119100
documents in that way, do this:
120101

121102
1. Open a new terminal window and start up the validator as an HTTP service,
122-
as described in the Web-based usage section.
103+
as described in the Web-based usage section.
123104

124105
2. Open a second new terminal window and invoke `vnu.jar` like this:
125106

@@ -136,8 +117,7 @@ error-level ones by setting the value of the `nu.validator.client.level` system
136117
property to `error`, like this:
137118

138119
java -Dnu.validator.client.level=error\
139-
140-
-cp vnu.jar nu.validator.client.HttpClient FILE.html...
120+
-cp vnu.jar nu.validator.client.HttpClient FILE.html...
141121

142122
Most of the properties listed below map to the validator.nu common input
143123
parameters documented at
@@ -148,74 +128,51 @@ parameters documented at
148128
#### nu.validator.client.host
149129

150130
Specifies the hostname of the validator for the client to connect to.
151-
152131
default: "127.0.0.1"
153132

154133
#### nu.validator.client.port
155134

156135
Specifies the hostname of the validator for the client to connect to.
157-
158-
default: "8888"
159-
160-
example: java -Dnu.validator.client.port=8080 -jar vnu.jar FILE.html
136+
default: "8888" example: java -Dnu.validator.client.port=8080 -jar vnu.jar
137+
FILE.html
161138

162139
#### nu.validator.client.level
163140

164-
Specifies the severity level of validation messages to report; to
165-
166-
suppress warning-level messages, and only show error-level ones, set
167-
168-
this property to "error".
169-
170-
default: [unset]
171-
172-
possible values: "error"
173-
174-
example: java -Dnu.validator.client.level=error -jar vnu.jar FILE.html
141+
Specifies the severity level of validation messages to report; to suppress
142+
warning-level messages, and only show error-level ones, set this property to
143+
"error". default: [unset] possible values: "error" example: java
144+
-Dnu.validator.client.level=error -jar vnu.jar FILE.html
175145

176146
#### nu.validator.client.parser
177147

178-
Specifies which parser to use.
179-
180-
default: "html"; or, for *.xhtml input files, "xml"
181-
182-
possible values: see
183-
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser][10]
148+
Specifies which parser to use. default: "html"; or, for *.xhtml input
149+
files, "xml" possible values: see
150+
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser][10]
184151

185152
[10]: http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser
186153

187154
#### nu.validator.client.charset
188155

189-
Specifies the encoding of the input document.
190-
191-
default: [unset]
156+
Specifies the encoding of the input document. default: [unset]
192157

193158
#### nu.validator.client.content-type
194159

195-
Specifies the content-type of the input document.
196-
197-
default: "text/html"; or, for *.xhtml files, "application/xhtml+xml"
160+
Specifies the content-type of the input document. default: "text/html"; or,
161+
for *.xhtml files, "application/xhtml+xml"
198162

199163
#### nu.validator.client.out
200164

201-
Specifies the output format for validation messages.
202-
203-
default: "gnu"
204-
165+
Specifies the output format for validation messages. default: "gnu"
205166
possible values: see
206-
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out][11]
167+
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out][11]
207168

208169
[11]: http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out
209170

210171
#### nu.validator.client.asciiquotes
211172

212-
Specifies whether ASCII quotation marks are substituted for Unicode
213-
214-
smart quotation marks in validation messages.
215-
216-
default: "yes"
217-
218-
possible values: "yes" or "no"
173+
Specifies whether ASCII quotation marks are substituted for Unicode smart
174+
quotation marks in validation messages. default: "yes" possible values:
175+
"yes" or "no"
219176

220177
For more information... sources bugz etc.
221178

0 commit comments

Comments
 (0)