md2man 5.0.3 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +5 -5
- data/VERSION.markdown +24 -0
- data/bin/md2man-html +29 -19
- data/bin/md2man-rake +8 -5
- data/bin/md2man-roff +6 -5
- data/lib/md2man/html.rb +7 -1
- data/lib/md2man/rakefile.rb +15 -3
- data/lib/md2man/version.rb +1 -1
- data/man/index.html +3 -3
- data/man/man0/EXAMPLE.html +1 -1
- data/man/man0/README.html +58 -58
- data/man/man0/VERSION.html +30 -16
- data/man/man1/md2man-html.1 +7 -10
- data/man/man1/md2man-html.1.html +18 -18
- data/man/man1/md2man-rake.1 +9 -6
- data/man/man1/md2man-rake.1.html +6 -6
- data/man/man1/md2man-roff.1 +7 -10
- data/man/man1/md2man-roff.1.html +4 -4
- data/man/man5/md2man.5 +18 -22
- data/man/man5/md2man.5.html +55 -54
- data/man/man5/md2man.5.markdown +13 -13
- data/man/style.css +209 -0
- data/md2man.gemspec +5 -4
- data/test/md2man/html_test.rb +28 -4
- metadata +18 -6
- data/EXAMPLE.png +0 -0
- data/man/man0/EXAMPLE.png +0 -1
data/man/man5/md2man.5.markdown
CHANGED
@@ -1,22 +1,23 @@
|
|
1
|
-
# MD2MAN 5 2016-02-
|
1
|
+
# MD2MAN 5 2016-02-28 5.1.0
|
2
2
|
|
3
3
|
## NAME
|
4
4
|
|
5
|
-
md2man - UNIX manual page flavoring for
|
5
|
+
md2man - UNIX manual page flavoring for [Markdown]
|
6
6
|
|
7
7
|
## DESCRIPTION
|
8
8
|
|
9
|
-
|
9
|
+
md2man makes the [Markdown] format more friendly for writing UNIX manual
|
10
10
|
pages by extending its syntax, semantics, and assumed processing extensions.
|
11
11
|
|
12
12
|
### Syntax
|
13
13
|
|
14
|
-
md2man extends
|
14
|
+
md2man extends [Markdown] syntax by recognizing three kinds of paragraphs,
|
15
|
+
analogous to the underlying `.PP`, `.TP`, and `.IP` directives in roff(7).
|
15
16
|
|
16
17
|
#### Normal paragraphs
|
17
18
|
|
18
19
|
Paragraphs whose lines are all indented by exactly zero or one additional
|
19
|
-
|
20
|
+
space are considered "normal paragraphs", analogous to `.PP` in roff(7):
|
20
21
|
|
21
22
|
This is a normal paragraph.
|
22
23
|
|
@@ -35,8 +36,8 @@ spaces are considered to be "normal paragraphs". For example:
|
|
35
36
|
#### Tagged paragraphs
|
36
37
|
|
37
38
|
Paragraphs whose first line is indented by less than two additional spaces and
|
38
|
-
whose subsequent lines are uniformly indented by exactly two additional
|
39
|
-
are considered
|
39
|
+
whose subsequent lines are all uniformly indented by exactly two additional
|
40
|
+
spaces are considered "tagged paragraphs", analogous to `.TP` in roff(7):
|
40
41
|
|
41
42
|
This is a
|
42
43
|
tagged
|
@@ -45,7 +46,7 @@ are considered to be "tagged paragraphs". For example:
|
|
45
46
|
#### Indented paragraphs
|
46
47
|
|
47
48
|
Paragraphs whose lines are all uniformly indented by exactly two additional
|
48
|
-
spaces are considered
|
49
|
+
spaces are considered "indented paragraphs", analogous to `.IP` in roff(7):
|
49
50
|
|
50
51
|
This is an
|
51
52
|
indented
|
@@ -53,7 +54,7 @@ spaces are considered to be "indented paragraphs". For example:
|
|
53
54
|
|
54
55
|
### Semantics
|
55
56
|
|
56
|
-
md2man extends
|
57
|
+
md2man extends [Markdown] semantics by treating top-level headings specially.
|
57
58
|
|
58
59
|
#### Top-level headings
|
59
60
|
|
@@ -81,7 +82,7 @@ Any subsequent top-level headings are treated as second-level `<h2>` headings.
|
|
81
82
|
|
82
83
|
### Extensions
|
83
84
|
|
84
|
-
md2man enables the following [Redcarpet] extensions while reading
|
85
|
+
md2man enables the following [Redcarpet] extensions while reading [Markdown]:
|
85
86
|
|
86
87
|
* tables
|
87
88
|
* autolink
|
@@ -184,7 +185,6 @@ http://www.schweikhardt.net/man_page_howto.html)
|
|
184
185
|
|
185
186
|
## SEE ALSO
|
186
187
|
|
187
|
-
|
188
|
+
[Markdown], man-pages(7), roff(7), md2man-roff(1), md2man-html(1)
|
188
189
|
|
189
|
-
[
|
190
|
-
[Redcarpet]: https://github.com/vmg/redcarpet
|
190
|
+
[Markdown]: http://daringfireball.net/projects/markdown/syntax
|
data/man/style.css
CHANGED
@@ -86,3 +86,212 @@
|
|
86
86
|
content: none;
|
87
87
|
}
|
88
88
|
}
|
89
|
+
.highlight table td { padding: 5px; }
|
90
|
+
.highlight table pre { margin: 0; }
|
91
|
+
.highlight .cm {
|
92
|
+
color: #999988;
|
93
|
+
font-style: italic;
|
94
|
+
}
|
95
|
+
.highlight .cp {
|
96
|
+
color: #999999;
|
97
|
+
font-weight: bold;
|
98
|
+
}
|
99
|
+
.highlight .c1 {
|
100
|
+
color: #999988;
|
101
|
+
font-style: italic;
|
102
|
+
}
|
103
|
+
.highlight .cs {
|
104
|
+
color: #999999;
|
105
|
+
font-weight: bold;
|
106
|
+
font-style: italic;
|
107
|
+
}
|
108
|
+
.highlight .c, .highlight .cd {
|
109
|
+
color: #999988;
|
110
|
+
font-style: italic;
|
111
|
+
}
|
112
|
+
.highlight .err {
|
113
|
+
color: #a61717;
|
114
|
+
background-color: #e3d2d2;
|
115
|
+
}
|
116
|
+
.highlight .gd {
|
117
|
+
color: #000000;
|
118
|
+
background-color: #ffdddd;
|
119
|
+
}
|
120
|
+
.highlight .ge {
|
121
|
+
color: #000000;
|
122
|
+
font-style: italic;
|
123
|
+
}
|
124
|
+
.highlight .gr {
|
125
|
+
color: #aa0000;
|
126
|
+
}
|
127
|
+
.highlight .gh {
|
128
|
+
color: #999999;
|
129
|
+
}
|
130
|
+
.highlight .gi {
|
131
|
+
color: #000000;
|
132
|
+
background-color: #ddffdd;
|
133
|
+
}
|
134
|
+
.highlight .go {
|
135
|
+
color: #888888;
|
136
|
+
}
|
137
|
+
.highlight .gp {
|
138
|
+
color: #555555;
|
139
|
+
}
|
140
|
+
.highlight .gs {
|
141
|
+
font-weight: bold;
|
142
|
+
}
|
143
|
+
.highlight .gu {
|
144
|
+
color: #aaaaaa;
|
145
|
+
}
|
146
|
+
.highlight .gt {
|
147
|
+
color: #aa0000;
|
148
|
+
}
|
149
|
+
.highlight .kc {
|
150
|
+
color: #000000;
|
151
|
+
font-weight: bold;
|
152
|
+
}
|
153
|
+
.highlight .kd {
|
154
|
+
color: #000000;
|
155
|
+
font-weight: bold;
|
156
|
+
}
|
157
|
+
.highlight .kn {
|
158
|
+
color: #000000;
|
159
|
+
font-weight: bold;
|
160
|
+
}
|
161
|
+
.highlight .kp {
|
162
|
+
color: #000000;
|
163
|
+
font-weight: bold;
|
164
|
+
}
|
165
|
+
.highlight .kr {
|
166
|
+
color: #000000;
|
167
|
+
font-weight: bold;
|
168
|
+
}
|
169
|
+
.highlight .kt {
|
170
|
+
color: #445588;
|
171
|
+
font-weight: bold;
|
172
|
+
}
|
173
|
+
.highlight .k, .highlight .kv {
|
174
|
+
color: #000000;
|
175
|
+
font-weight: bold;
|
176
|
+
}
|
177
|
+
.highlight .mf {
|
178
|
+
color: #009999;
|
179
|
+
}
|
180
|
+
.highlight .mh {
|
181
|
+
color: #009999;
|
182
|
+
}
|
183
|
+
.highlight .il {
|
184
|
+
color: #009999;
|
185
|
+
}
|
186
|
+
.highlight .mi {
|
187
|
+
color: #009999;
|
188
|
+
}
|
189
|
+
.highlight .mo {
|
190
|
+
color: #009999;
|
191
|
+
}
|
192
|
+
.highlight .m, .highlight .mb, .highlight .mx {
|
193
|
+
color: #009999;
|
194
|
+
}
|
195
|
+
.highlight .sb {
|
196
|
+
color: #d14;
|
197
|
+
}
|
198
|
+
.highlight .sc {
|
199
|
+
color: #d14;
|
200
|
+
}
|
201
|
+
.highlight .sd {
|
202
|
+
color: #d14;
|
203
|
+
}
|
204
|
+
.highlight .s2 {
|
205
|
+
color: #d14;
|
206
|
+
}
|
207
|
+
.highlight .se {
|
208
|
+
color: #d14;
|
209
|
+
}
|
210
|
+
.highlight .sh {
|
211
|
+
color: #d14;
|
212
|
+
}
|
213
|
+
.highlight .si {
|
214
|
+
color: #d14;
|
215
|
+
}
|
216
|
+
.highlight .sx {
|
217
|
+
color: #d14;
|
218
|
+
}
|
219
|
+
.highlight .sr {
|
220
|
+
color: #009926;
|
221
|
+
}
|
222
|
+
.highlight .s1 {
|
223
|
+
color: #d14;
|
224
|
+
}
|
225
|
+
.highlight .ss {
|
226
|
+
color: #990073;
|
227
|
+
}
|
228
|
+
.highlight .s {
|
229
|
+
color: #d14;
|
230
|
+
}
|
231
|
+
.highlight .na {
|
232
|
+
color: #008080;
|
233
|
+
}
|
234
|
+
.highlight .bp {
|
235
|
+
color: #999999;
|
236
|
+
}
|
237
|
+
.highlight .nb {
|
238
|
+
color: #0086B3;
|
239
|
+
}
|
240
|
+
.highlight .nc {
|
241
|
+
color: #445588;
|
242
|
+
font-weight: bold;
|
243
|
+
}
|
244
|
+
.highlight .no {
|
245
|
+
color: #008080;
|
246
|
+
}
|
247
|
+
.highlight .nd {
|
248
|
+
color: #3c5d5d;
|
249
|
+
font-weight: bold;
|
250
|
+
}
|
251
|
+
.highlight .ni {
|
252
|
+
color: #800080;
|
253
|
+
}
|
254
|
+
.highlight .ne {
|
255
|
+
color: #990000;
|
256
|
+
font-weight: bold;
|
257
|
+
}
|
258
|
+
.highlight .nf {
|
259
|
+
color: #990000;
|
260
|
+
font-weight: bold;
|
261
|
+
}
|
262
|
+
.highlight .nl {
|
263
|
+
color: #990000;
|
264
|
+
font-weight: bold;
|
265
|
+
}
|
266
|
+
.highlight .nn {
|
267
|
+
color: #555555;
|
268
|
+
}
|
269
|
+
.highlight .nt {
|
270
|
+
color: #000080;
|
271
|
+
}
|
272
|
+
.highlight .vc {
|
273
|
+
color: #008080;
|
274
|
+
}
|
275
|
+
.highlight .vg {
|
276
|
+
color: #008080;
|
277
|
+
}
|
278
|
+
.highlight .vi {
|
279
|
+
color: #008080;
|
280
|
+
}
|
281
|
+
.highlight .nv {
|
282
|
+
color: #008080;
|
283
|
+
}
|
284
|
+
.highlight .ow {
|
285
|
+
color: #000000;
|
286
|
+
font-weight: bold;
|
287
|
+
}
|
288
|
+
.highlight .o {
|
289
|
+
color: #000000;
|
290
|
+
font-weight: bold;
|
291
|
+
}
|
292
|
+
.highlight .w {
|
293
|
+
color: #bbbbbb;
|
294
|
+
}
|
295
|
+
.highlight {
|
296
|
+
background-color: #f8f8f8;
|
297
|
+
}
|
data/md2man.gemspec
CHANGED
@@ -8,21 +8,22 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors,
|
9
9
|
s.email = File.read('LICENSE').scan(/Copyright \d+ (.+) <(.+?)>/).transpose
|
10
10
|
s.license = 'ISC'
|
11
|
-
s.homepage = '
|
11
|
+
s.homepage = 'https://sunaku.github.io/md2man'
|
12
12
|
s.summary = 'markdown to manpage'
|
13
|
-
s.description = 'Converts markdown
|
13
|
+
s.description = 'Converts markdown into UNIX manpages and HTML webpages.'
|
14
14
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
18
|
s.require_paths = ['lib']
|
19
19
|
|
20
|
-
s.files += Dir['man/man?/*.?']
|
21
|
-
s.files += Dir['man/**/*.{html,css
|
20
|
+
s.files += Dir['man/man?/*.?'] # UNIX manpages
|
21
|
+
s.files += Dir['man/**/*.{html,css}'] # HTML manpages
|
22
22
|
|
23
23
|
s.required_ruby_version = '>= 1.9.1'
|
24
24
|
s.add_runtime_dependency 'binman', '~> 5.0'
|
25
25
|
s.add_runtime_dependency 'redcarpet', '~> 3.0'
|
26
|
+
s.add_runtime_dependency 'rouge', '~> 1.0'
|
26
27
|
s.add_development_dependency 'minitest', '~> 5.0'
|
27
28
|
s.add_development_dependency 'rake', '~> 10.1'
|
28
29
|
end
|
data/test/md2man/html_test.rb
CHANGED
@@ -57,7 +57,7 @@ describe 'html engine' do
|
|
57
57
|
|
|
58
58
|
| <a class="md2man-reference" href="../man3/printf.3.html">printf(3)</a>
|
59
59
|
INPUT
|
60
|
-
|<p>For example, the <code>printf(3)</code> cross reference would be emitted as this HTML:</p><pre><code><a class
|
60
|
+
|<p>For example, the <code>printf(3)</code> cross reference would be emitted as this HTML:</p><pre class="highlight plaintext"><code><a class="md2man-reference" href="../man3/printf.3.html">printf(3)</a>
|
61
61
|
|</code></pre>
|
62
62
|
|
|
63
63
|
OUTPUT
|
@@ -85,7 +85,7 @@ describe 'html engine' do
|
|
85
85
|
| containing markdown(7),
|
86
86
|
| roff(7), and much more!
|
87
87
|
INPUT
|
88
|
-
|<pre><code>this is a code block
|
88
|
+
|<pre class="highlight plaintext"><code>this is a code block
|
89
89
|
|containing markdown(7),
|
90
90
|
|roff(7), and much more!
|
91
91
|
|</code></pre>
|
@@ -121,7 +121,7 @@ describe 'html engine' do
|
|
121
121
|
| \\__/\\____/_/ /_/|_\\
|
122
122
|
| >>>------>
|
123
123
|
INPUT
|
124
|
-
|<pre><code>_______ _______
|
124
|
+
|<pre class="highlight plaintext"><code>_______ _______
|
125
125
|
| ___ /___________ /__
|
126
126
|
| _ __/ __ \\ __/ /_/
|
127
127
|
| / /_/ /_/ / / / ,\\
|
@@ -232,7 +232,7 @@ describe 'html engine' do
|
|
232
232
|
|
|
233
233
|
|### `PIPES_GET_LAST(CHAIN)`
|
234
234
|
INPUT
|
235
|
-
|<h3 id="macros">Macros<a name="macros" href="#macros" class="md2man-permalink" title="permalink"></a></h3><pre><code>#define PIPES_GET_LAST(CHAIN)
|
235
|
+
|<h3 id="macros">Macros<a name="macros" href="#macros" class="md2man-permalink" title="permalink"></a></h3><pre class="highlight plaintext"><code>#define PIPES_GET_LAST(CHAIN)
|
236
236
|
|#define PIPES_GET_IN(CHAIN)
|
237
237
|
|#define PIPES_GET_OUT(CHAIN)
|
238
238
|
|#define PIPES_GET_ERR(CHAIN)
|
@@ -260,4 +260,28 @@ describe 'html engine' do
|
|
260
260
|
|<p><code>\n</code></p>
|
261
261
|
OUTPUT
|
262
262
|
end
|
263
|
+
|
264
|
+
it 'renders fenced code blocks' do
|
265
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
266
|
+
|```
|
267
|
+
| Array.new(123, "abc")
|
268
|
+
|```
|
269
|
+
INPUT
|
270
|
+
|<pre class="highlight plaintext"><code> Array.new(123, "abc")
|
271
|
+
|</code></pre>
|
272
|
+
|
|
273
|
+
OUTPUT
|
274
|
+
end
|
275
|
+
|
276
|
+
it 'renders fenced code blocks with syntax highlighting' do
|
277
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
278
|
+
|```ruby
|
279
|
+
| Array.new(123, "abc")
|
280
|
+
|```
|
281
|
+
INPUT
|
282
|
+
|<pre class="highlight ruby"><code> <span class="no">Array</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="mi">123</span><span class="p">,</span> <span class="s2">"abc"</span><span class="p">)</span>
|
283
|
+
|</code></pre>
|
284
|
+
|
|
285
|
+
OUTPUT
|
286
|
+
end
|
263
287
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: md2man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suraj N. Kurapati
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binman
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rouge
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: minitest
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +80,7 @@ dependencies:
|
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '10.1'
|
69
|
-
description: Converts markdown
|
83
|
+
description: Converts markdown into UNIX manpages and HTML webpages.
|
70
84
|
email:
|
71
85
|
- https://github.com/sunaku
|
72
86
|
executables:
|
@@ -78,7 +92,6 @@ extra_rdoc_files: []
|
|
78
92
|
files:
|
79
93
|
- ".gitignore"
|
80
94
|
- EXAMPLE.markdown
|
81
|
-
- EXAMPLE.png
|
82
95
|
- Gemfile
|
83
96
|
- LICENSE
|
84
97
|
- README.markdown
|
@@ -99,7 +112,6 @@ files:
|
|
99
112
|
- man/index.html
|
100
113
|
- man/man0/EXAMPLE.html
|
101
114
|
- man/man0/EXAMPLE.markdown
|
102
|
-
- man/man0/EXAMPLE.png
|
103
115
|
- man/man0/README.html
|
104
116
|
- man/man0/README.markdown
|
105
117
|
- man/man0/VERSION.html
|
@@ -118,7 +130,7 @@ files:
|
|
118
130
|
- test/md2man/html_test.rb
|
119
131
|
- test/md2man/roff_test.rb
|
120
132
|
- test/test_helper.rb
|
121
|
-
homepage:
|
133
|
+
homepage: https://sunaku.github.io/md2man
|
122
134
|
licenses:
|
123
135
|
- ISC
|
124
136
|
metadata: {}
|
data/EXAMPLE.png
DELETED
Binary file
|