md2man 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -0
- data/VERSION.markdown +16 -1
- data/bin/md2man-html +1 -1
- data/bin/md2man-rake +1 -1
- data/bin/md2man-roff +1 -1
- data/lib/md2man/html.rb +1 -1
- data/lib/md2man/roff.rb +16 -16
- data/lib/md2man/version.rb +1 -1
- data/man/index.html +1 -1
- data/man/man0/README.html +1 -1
- data/man/man0/VERSION.html +11 -3
- data/man/man0/VERSION.markdown +16 -1
- data/man/man1/md2man-html.1 +5 -5
- data/man/man1/md2man-html.1.html +2 -2
- data/man/man1/md2man-rake.1 +4 -4
- data/man/man1/md2man-rake.1.html +2 -2
- data/man/man1/md2man-roff.1 +3 -3
- data/man/man1/md2man-roff.1.html +2 -2
- data/man/man5/md2man.5 +2 -2
- data/man/man5/md2man.5.html +2 -2
- data/man/man5/md2man.5.markdown +1 -1
- data/test/md2man/roff_test.rb +97 -5
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fc358158819e63351eafa2b2ff7681b60ccc9c9
|
4
|
+
data.tar.gz: c998f1f9e84ff9748f75a4258b7f2aead52ce6f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a648664ce6a6eae9ea93b521103834e180a0edd0c3d0db70158f109e6db8bf56689a292c5f0b8825d0ef52c096b162a9740192b61648622562a39c64c76e3d7b
|
7
|
+
data.tar.gz: e6528b94be7ad596f2ca6165daf4d6c30979de6b78d015026be9a1e4a3993a6e714807391e56d26f6c44ecf49c1e9d86bcf5bc20f1969fcfe75404903e182245
|
data/LICENSE
CHANGED
@@ -5,6 +5,7 @@ Thanks to 2011 Vicent Marti <https://github.com/vmg>
|
|
5
5
|
Thanks to 2012 Postmodern <https://github.com/postmodern>
|
6
6
|
Thanks to 2013 Bastien Dejean <https://github.com/baskerville>
|
7
7
|
Thanks to 2013 Nick Fagerlund <https://github.com/nfagerlund>
|
8
|
+
Thanks to 2014 zimbatm <https://github.com/zimbatm>
|
8
9
|
|
9
10
|
Permission to use, copy, modify, and/or distribute this software for any
|
10
11
|
purpose with or without fee is hereby granted, provided that the above
|
data/VERSION.markdown
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## Version 2.0.4 (2014-04-26)
|
2
|
+
|
3
|
+
### Patch:
|
4
|
+
|
5
|
+
* GH-16: Redcarpet 3.1 added a third parameter to its `header()` method.
|
6
|
+
This raised an ArgumentError on "wrong number of arguments (3 for 2)".
|
7
|
+
|
8
|
+
Thanks to zimbatm for contributing this patch.
|
9
|
+
|
10
|
+
* GH-17 and GH-18: Escape periods, quotes, and hyphens in code blocks.
|
11
|
+
This fixes a bug where lines beginning with periods or single quotes
|
12
|
+
did not appear when md2man-roff(1) output was rendered using man(1).
|
13
|
+
|
14
|
+
Thanks to zimbatm for reporting this bug and suggesting how to fix it.
|
15
|
+
|
1
16
|
## Version 2.0.3 (2014-01-16)
|
2
17
|
|
3
18
|
### Patch:
|
@@ -16,7 +31,7 @@ Patch:
|
|
16
31
|
|
17
32
|
Thanks to Nick Fagerlund for reporting this bug.
|
18
33
|
|
19
|
-
*
|
34
|
+
* escape periods at line beginnings with \& escape
|
20
35
|
|
21
36
|
* escape text line backslashes as "\e" per groff(7)
|
22
37
|
|
data/bin/md2man-html
CHANGED
data/bin/md2man-rake
CHANGED
data/bin/md2man-roff
CHANGED
data/lib/md2man/html.rb
CHANGED
@@ -22,7 +22,7 @@ module Md2Man::HTML
|
|
22
22
|
"<dl><dd>#{text}</dd></dl>"
|
23
23
|
end
|
24
24
|
|
25
|
-
def header text, level
|
25
|
+
def header text, level, _=nil
|
26
26
|
id = text.gsub(/<.+?>/, '-'). # strip all HTML tags
|
27
27
|
gsub(/\W+/, '-').gsub(/^-|-$/, '') # fold non-word chars
|
28
28
|
%{<h#{level} id="#{id}">#{text}</h#{level}>}
|
data/lib/md2man/roff.rb
CHANGED
@@ -42,7 +42,7 @@ module Md2Man::Roff
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def block_code code, language
|
45
|
-
code =
|
45
|
+
code = escape(code, true)
|
46
46
|
block_quote "\n.nf\n#{code.chomp}\n.fi\n"
|
47
47
|
end
|
48
48
|
|
@@ -54,7 +54,7 @@ module Md2Man::Roff
|
|
54
54
|
warn "md2man/roff: block_html not implemented: #{html.inspect}"
|
55
55
|
end
|
56
56
|
|
57
|
-
def header text, level
|
57
|
+
def header text, level, _=nil
|
58
58
|
macro =
|
59
59
|
case level
|
60
60
|
when 1
|
@@ -161,7 +161,7 @@ module Md2Man::Roff
|
|
161
161
|
end
|
162
162
|
|
163
163
|
def codespan code
|
164
|
-
code =
|
164
|
+
code = escape(code, true)
|
165
165
|
# NOTE: this double font sequence gives us the best of both worlds:
|
166
166
|
# man(1) shows it in bold and `groff -Thtml` shows it in monospace
|
167
167
|
"\\fB\\fC#{code}\\fR"
|
@@ -197,17 +197,7 @@ module Md2Man::Roff
|
|
197
197
|
#---------------------------------------------------------------------------
|
198
198
|
|
199
199
|
def normal_text text
|
200
|
-
|
201
|
-
# escape backslashes so that they appear in the printable output
|
202
|
-
gsub('\\', '\\[rs]').
|
203
|
-
|
204
|
-
# inhibit soft-hyphens so that they appear in the printable output
|
205
|
-
gsub('-', '\\-').
|
206
|
-
|
207
|
-
# inhibit line-beginning control characters (period and single-quote)
|
208
|
-
# by prefixing a non-printable, zero-width glyph (backslash-ampersand)
|
209
|
-
gsub(/^(?=[.'])/, '\\\\&')
|
210
|
-
end
|
200
|
+
escape text, false if text
|
211
201
|
end
|
212
202
|
|
213
203
|
def entity text
|
@@ -220,8 +210,18 @@ module Md2Man::Roff
|
|
220
210
|
|
221
211
|
private
|
222
212
|
|
223
|
-
def
|
224
|
-
text.
|
213
|
+
def escape text, literally
|
214
|
+
if text then text.
|
215
|
+
# escape backslashes so that they appear in the printable output
|
216
|
+
gsub('\\', literally ? '\&\&' : '\\[rs]').
|
217
|
+
|
218
|
+
# escape soft-hyphens so that they appear in the printable output
|
219
|
+
gsub('-', '\\-').
|
220
|
+
|
221
|
+
# escape line-beginning control characters (period and single quote)
|
222
|
+
# by prefixing a non-printable, zero-width glyph (backslash ampersand)
|
223
|
+
gsub(/^(?=[.'])/, '\\\\&')
|
224
|
+
end
|
225
225
|
end
|
226
226
|
|
227
227
|
def remove_leading_pp text
|
data/lib/md2man/version.rb
CHANGED
data/man/index.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 2.0.
|
5
|
+
<meta name="generator" content="md2man 2.0.4 https://github.com/sunaku/md2man" />
|
6
6
|
<title>man/index</title>
|
7
7
|
<link rel="stylesheet" href="style.css"/>
|
8
8
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
data/man/man0/README.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 2.0.
|
5
|
+
<meta name="generator" content="md2man 2.0.4 https://github.com/sunaku/md2man" />
|
6
6
|
<title>README</title>
|
7
7
|
<link rel="stylesheet" href="../style.css"/>
|
8
8
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
data/man/man0/VERSION.html
CHANGED
@@ -2,19 +2,27 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 2.0.
|
5
|
+
<meta name="generator" content="md2man 2.0.4 https://github.com/sunaku/md2man" />
|
6
6
|
<title>VERSION</title>
|
7
7
|
<link rel="stylesheet" href="../style.css"/>
|
8
8
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
9
9
|
</head>
|
10
|
-
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man0">man0</a>/VERSION</span></div></div><div class="container-fluid"><h2 id="Version-2-0-
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man0">man0</a>/VERSION</span></div></div><div class="container-fluid"><h2 id="Version-2-0-4-2014-04-26">Version 2.0.4 (2014-04-26)</h2><h3 id="Patch">Patch:</h3>
|
11
|
+
<ul>
|
12
|
+
<li><p>GH-16: Redcarpet 3.1 added a third parameter to its <code>header()</code> method.
|
13
|
+
This raised an ArgumentError on "wrong number of arguments (3 for 2)".</p><p>Thanks to zimbatm for contributing this patch.</p></li>
|
14
|
+
<li><p>GH-17 and GH-18: Escape periods, quotes, and hyphens in code blocks.
|
15
|
+
This fixes a bug where lines beginning with periods or single quotes
|
16
|
+
did not appear when <a class="md2man-xref" href="../man1/md2man-roff.1.html">md2man-roff(1)</a> output was rendered using <a class="md2man-xref">man(1)</a>.</p><p>Thanks to zimbatm for reporting this bug and suggesting how to fix it.</p></li>
|
17
|
+
</ul>
|
18
|
+
<h2 id="Version-2-0-3-2014-01-16">Version 2.0.3 (2014-01-16)</h2><h3 id="Patch">Patch:</h3>
|
11
19
|
<ul>
|
12
20
|
<li><p>Use CSS3 <code>-ch</code> suffix for accurate 80-character width in HTML output.</p><p><a href="http://www.w3.org/TR/css3-values/#font-relative-lengths">http://www.w3.org/TR/css3-values/#font-relative-lengths</a></p></li>
|
13
21
|
</ul>
|
14
22
|
<h2 id="Version-2-0-2-2013-09-08">Version 2.0.2 (2013-09-08)</h2><p>Patch:</p>
|
15
23
|
<ul>
|
16
24
|
<li><p>GH-14: escape single quotes at beginning of lines</p><p>See the "CONTROL CHARACTERS" section in the <a class="md2man-xref">groff(7)</a> manual for details.</p><p>Thanks to Nick Fagerlund for reporting this bug.</p></li>
|
17
|
-
<li><p>
|
25
|
+
<li><p>escape periods at line beginnings with & escape</p></li>
|
18
26
|
<li><p>escape text line backslashes as "\e" per <a class="md2man-xref">groff(7)</a></p></li>
|
19
27
|
<li><p>better documentation for escaping in normal_text()</p></li>
|
20
28
|
<li><p>it's better to escape backslashes as [rs] than \e</p><p>See "Single-Character Escapes" section in <a class="md2man-xref">groff(7)</a>.</p></li>
|
data/man/man0/VERSION.markdown
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## Version 2.0.4 (2014-04-26)
|
2
|
+
|
3
|
+
### Patch:
|
4
|
+
|
5
|
+
* GH-16: Redcarpet 3.1 added a third parameter to its `header()` method.
|
6
|
+
This raised an ArgumentError on "wrong number of arguments (3 for 2)".
|
7
|
+
|
8
|
+
Thanks to zimbatm for contributing this patch.
|
9
|
+
|
10
|
+
* GH-17 and GH-18: Escape periods, quotes, and hyphens in code blocks.
|
11
|
+
This fixes a bug where lines beginning with periods or single quotes
|
12
|
+
did not appear when md2man-roff(1) output was rendered using man(1).
|
13
|
+
|
14
|
+
Thanks to zimbatm for reporting this bug and suggesting how to fix it.
|
15
|
+
|
1
16
|
## Version 2.0.3 (2014-01-16)
|
2
17
|
|
3
18
|
### Patch:
|
@@ -16,7 +31,7 @@ Patch:
|
|
16
31
|
|
17
32
|
Thanks to Nick Fagerlund for reporting this bug.
|
18
33
|
|
19
|
-
*
|
34
|
+
* escape periods at line beginnings with \& escape
|
20
35
|
|
21
36
|
* escape text line backslashes as "\e" per groff(7)
|
22
37
|
|
data/man/man1/md2man-html.1
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH MD2MAN\-HTML 1 2014\-
|
1
|
+
.TH MD2MAN\-HTML 1 2014\-04\-26 2.0.4
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
4
|
md2man\-html \- convert
|
@@ -8,7 +8,7 @@ flavored
|
|
8
8
|
into HTML
|
9
9
|
.SH SYNOPSIS
|
10
10
|
.PP
|
11
|
-
\fB\fCmd2man
|
11
|
+
\fB\fCmd2man\-html\fR [\fIOPTION\fP]... [\fIFILE\fP]
|
12
12
|
.SH DESCRIPTION
|
13
13
|
.PP
|
14
14
|
This program converts
|
@@ -21,7 +21,7 @@ If \fIFILE\fP is not given, then the standard input stream is read in its place.
|
|
21
21
|
.SS Cross references
|
22
22
|
.PP
|
23
23
|
Cross references to manual pages are emitted as HTML hyperlinks that have
|
24
|
-
\fB\fCclass="md2man
|
24
|
+
\fB\fCclass="md2man\-xref"\fR and \fB\fChref="../man$SECTION/$PAGE.$SECTION.html"\fR
|
25
25
|
attributes.
|
26
26
|
.PP
|
27
27
|
For example, the \fB\fC
|
@@ -30,13 +30,13 @@ cross reference would be emitted as this HTML:
|
|
30
30
|
.PP
|
31
31
|
.RS
|
32
32
|
.nf
|
33
|
-
<a class="md2man
|
33
|
+
<a class="md2man\-xref" href="../man3/printf.3.html">
|
34
34
|
.BR printf (3)</a>
|
35
35
|
.fi
|
36
36
|
.RE
|
37
37
|
.SH OPTIONS
|
38
38
|
.TP
|
39
|
-
\fB\fC
|
39
|
+
\fB\fC\-h\fR, \fB\fC\-\-help\fR
|
40
40
|
Show this help manual.
|
41
41
|
.SH SEE ALSO
|
42
42
|
.PP
|
data/man/man1/md2man-html.1.html
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 2.0.
|
5
|
+
<meta name="generator" content="md2man 2.0.4 https://github.com/sunaku/md2man" />
|
6
6
|
<title>md2man-html(1) — convert md2man(5) flavored markdown(7) into HTML</title>
|
7
7
|
<link rel="stylesheet" href="../style.css"/>
|
8
8
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
9
9
|
</head>
|
10
|
-
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/md2man-html.1</span></div></div><div class="container-fluid"><h1 id="MD2MAN-HTML-1-2014-
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/md2man-html.1</span></div></div><div class="container-fluid"><h1 id="MD2MAN-HTML-1-2014-04-26-2-0-4">MD2MAN-HTML 1 2014-04-26 2.0.4</h1><h2 id="NAME">NAME</h2><p>md2man-html - convert <a class="md2man-xref" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-xref">markdown(7)</a> into HTML</p><h2 id="SYNOPSIS">SYNOPSIS</h2><p><code>md2man-html</code> [<em>OPTION</em>]... [<em>FILE</em>]</p><h2 id="DESCRIPTION">DESCRIPTION</h2><p>This program converts <a class="md2man-xref" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-xref">markdown(7)</a> input from the given
|
11
11
|
<em>FILE</em> into HTML and then prints the result to the standard output stream.
|
12
12
|
If <em>FILE</em> is not given, then the standard input stream is read in its place.</p><h3 id="Cross-references">Cross references</h3><p>Cross references to manual pages are emitted as HTML hyperlinks that have
|
13
13
|
<code>class="md2man-xref"</code> and <code>href="../man$SECTION/$PAGE.$SECTION.html"</code>
|
data/man/man1/md2man-rake.1
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH MD2MAN\-RAKE 1 2014\-
|
1
|
+
.TH MD2MAN\-RAKE 1 2014\-04\-26 2.0.4
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
4
|
md2man\-rake \- run
|
@@ -7,7 +7,7 @@ tasks from
|
|
7
7
|
.BR md2man (1)
|
8
8
|
.SH SYNOPSIS
|
9
9
|
.PP
|
10
|
-
\fB\fCmd2man
|
10
|
+
\fB\fCmd2man\-rake\fR [\fIOPTION\fP]... [\fITASK\fP]...
|
11
11
|
.SH DESCRIPTION
|
12
12
|
.PP
|
13
13
|
This program lets you run
|
@@ -38,10 +38,10 @@ Builds HTML manual pages from \fB\fC*.markdown\fR, \fB\fC*.mkd\fR, and \fB\fC*.m
|
|
38
38
|
found in or beneath the \fB\fCman/\fR subdirectory in your working directory.
|
39
39
|
.SH OPTIONS
|
40
40
|
.TP
|
41
|
-
\fB\fC
|
41
|
+
\fB\fC\-h\fR, \fB\fC\-\-help\fR
|
42
42
|
Show this help manual.
|
43
43
|
.PP
|
44
|
-
Run \fB\fCrake
|
44
|
+
Run \fB\fCrake \-\-help\fR to see more options.
|
45
45
|
.SH SEE ALSO
|
46
46
|
.PP
|
47
47
|
.BR rake (1),
|
data/man/man1/md2man-rake.1.html
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 2.0.
|
5
|
+
<meta name="generator" content="md2man 2.0.4 https://github.com/sunaku/md2man" />
|
6
6
|
<title>md2man-rake(1) — run rake(1) tasks from md2man(1)</title>
|
7
7
|
<link rel="stylesheet" href="../style.css"/>
|
8
8
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
9
9
|
</head>
|
10
|
-
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/md2man-rake.1</span></div></div><div class="container-fluid"><h1 id="MD2MAN-RAKE-1-2014-
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/md2man-rake.1</span></div></div><div class="container-fluid"><h1 id="MD2MAN-RAKE-1-2014-04-26-2-0-4">MD2MAN-RAKE 1 2014-04-26 2.0.4</h1><h2 id="NAME">NAME</h2><p>md2man-rake - run <a class="md2man-xref">rake(1)</a> tasks from <a class="md2man-xref">md2man(1)</a></p><h2 id="SYNOPSIS">SYNOPSIS</h2><p><code>md2man-rake</code> [<em>OPTION</em>]... [<em>TASK</em>]...</p><h2 id="DESCRIPTION">DESCRIPTION</h2><p>This program lets you run <a class="md2man-xref">rake(1)</a> tasks provided by <a class="md2man-xref">md2man(1)</a> without having
|
11
11
|
to create a special file named <code>Rakefile</code> that contains the following snippet:</p>
|
12
12
|
<pre><code>require 'md2man/rakefile'
|
13
13
|
</code></pre>
|
data/man/man1/md2man-roff.1
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH MD2MAN\-ROFF 1 2014\-
|
1
|
+
.TH MD2MAN\-ROFF 1 2014\-04\-26 2.0.4
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
4
|
md2man\-roff \- convert
|
@@ -9,7 +9,7 @@ into
|
|
9
9
|
.BR roff (7)
|
10
10
|
.SH SYNOPSIS
|
11
11
|
.PP
|
12
|
-
\fB\fCmd2man
|
12
|
+
\fB\fCmd2man\-roff\fR [\fIOPTION\fP]... [\fIFILE\fP]
|
13
13
|
.SH DESCRIPTION
|
14
14
|
.PP
|
15
15
|
This program converts
|
@@ -44,7 +44,7 @@ nodes into
|
|
44
44
|
It issues a warning when it encounters these instead. Patches are welcome!
|
45
45
|
.SH OPTIONS
|
46
46
|
.TP
|
47
|
-
\fB\fC
|
47
|
+
\fB\fC\-h\fR, \fB\fC\-\-help\fR
|
48
48
|
Show this help manual.
|
49
49
|
.SH SEE ALSO
|
50
50
|
.PP
|
data/man/man1/md2man-roff.1.html
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 2.0.
|
5
|
+
<meta name="generator" content="md2man 2.0.4 https://github.com/sunaku/md2man" />
|
6
6
|
<title>md2man-roff(1) — convert md2man(5) flavored markdown(7) into roff(7)</title>
|
7
7
|
<link rel="stylesheet" href="../style.css"/>
|
8
8
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
9
9
|
</head>
|
10
|
-
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/md2man-roff.1</span></div></div><div class="container-fluid"><h1 id="MD2MAN-ROFF-1-2014-
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/md2man-roff.1</span></div></div><div class="container-fluid"><h1 id="MD2MAN-ROFF-1-2014-04-26-2-0-4">MD2MAN-ROFF 1 2014-04-26 2.0.4</h1><h2 id="NAME">NAME</h2><p>md2man-roff - convert <a class="md2man-xref" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-xref">markdown(7)</a> into <a class="md2man-xref">roff(7)</a></p><h2 id="SYNOPSIS">SYNOPSIS</h2><p><code>md2man-roff</code> [<em>OPTION</em>]... [<em>FILE</em>]</p><h2 id="DESCRIPTION">DESCRIPTION</h2><p>This program converts <a class="md2man-xref" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-xref">markdown(7)</a> input from the given
|
11
11
|
<em>FILE</em> into <a class="md2man-xref">roff(7)</a> and then prints the result to the standard output stream.
|
12
12
|
If <em>FILE</em> is not given, then the standard input stream is read in its place.</p><h3 id="Limitations">Limitations</h3><p>This program does not convert the following <a href="https://github.com/vmg/redcarpet">Redcarpet</a> nodes into <a class="md2man-xref">roff(7)</a>:</p>
|
13
13
|
<ul>
|
data/man/man5/md2man.5
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH MD2MAN 5 2014\-
|
1
|
+
.TH MD2MAN 5 2014\-04\-26 2.0.4
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
4
|
md2man \- manual page flavoring for the
|
@@ -85,7 +85,7 @@ semantics by treating top\-level headings specially.
|
|
85
85
|
.SS Top\-level headings
|
86
86
|
.PP
|
87
87
|
The first top\-level heading (H1) found in the input is considered to be the
|
88
|
-
\fB\fC
|
88
|
+
\fB\fC\&.TH\fR directive in
|
89
89
|
.BR roff (7),
|
90
90
|
which defines the UNIX manual page's header and
|
91
91
|
footer. Any subsequent top\-level headings are treated as second\-level (H2).
|
data/man/man5/md2man.5.html
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 2.0.
|
5
|
+
<meta name="generator" content="md2man 2.0.4 https://github.com/sunaku/md2man" />
|
6
6
|
<title>md2man(5) — manual page flavoring for the markdown(7) file format</title>
|
7
7
|
<link rel="stylesheet" href="../style.css"/>
|
8
8
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
9
9
|
</head>
|
10
|
-
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man5">man5</a>/md2man.5</span></div></div><div class="container-fluid"><h1 id="MD2MAN-5-2014-
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man5">man5</a>/md2man.5</span></div></div><div class="container-fluid"><h1 id="MD2MAN-5-2014-04-26-2-0-4">MD2MAN 5 2014-04-26 2.0.4</h1><h2 id="NAME">NAME</h2><p>md2man - manual page flavoring for the <a class="md2man-xref">markdown(7)</a> file format</p><h2 id="DESCRIPTION">DESCRIPTION</h2><p><a href="https://github.com/sunaku/md2man">md2man</a> makes the <a class="md2man-xref">markdown(7)</a> file format friendly for writing UNIX manual
|
11
11
|
pages by extending its syntax, semantics, and assumed processing extensions.</p><h3 id="Syntax">Syntax</h3><p>md2man extends <a class="md2man-xref">markdown(7)</a> syntax by defining three kinds of paragraphs.</p>
|
12
12
|
<pre><code>This is a
|
13
13
|
normal
|
data/man/man5/md2man.5.markdown
CHANGED
data/test/md2man/roff_test.rb
CHANGED
@@ -175,7 +175,7 @@ describe 'roff engine' do
|
|
175
175
|
OUTPUT
|
176
176
|
end
|
177
177
|
|
178
|
-
it '
|
178
|
+
it 'escapes periods at the beginning of lines in normal text' do
|
179
179
|
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
180
180
|
|.
|
181
181
|
INPUT
|
@@ -205,7 +205,7 @@ describe 'roff engine' do
|
|
205
205
|
OUTPUT
|
206
206
|
end
|
207
207
|
|
208
|
-
it '
|
208
|
+
it 'escapes single quotes at the beginning of lines in normal text' do
|
209
209
|
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
210
210
|
|'
|
211
211
|
INPUT
|
@@ -235,6 +235,98 @@ describe 'roff engine' do
|
|
235
235
|
OUTPUT
|
236
236
|
end
|
237
237
|
|
238
|
+
it 'escapes periods at the beginning of lines in code blocks' do
|
239
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
240
|
+
| .
|
241
|
+
INPUT
|
242
|
+
|.PP
|
243
|
+
|.RS
|
244
|
+
|.nf
|
245
|
+
|\\&.
|
246
|
+
|.fi
|
247
|
+
|.RE
|
248
|
+
OUTPUT
|
249
|
+
|
250
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
251
|
+
| ..
|
252
|
+
INPUT
|
253
|
+
|.PP
|
254
|
+
|.RS
|
255
|
+
|.nf
|
256
|
+
|\\&..
|
257
|
+
|.fi
|
258
|
+
|.RE
|
259
|
+
OUTPUT
|
260
|
+
|
261
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
262
|
+
| ...
|
263
|
+
INPUT
|
264
|
+
|.PP
|
265
|
+
|.RS
|
266
|
+
|.nf
|
267
|
+
|\\&...
|
268
|
+
|.fi
|
269
|
+
|.RE
|
270
|
+
OUTPUT
|
271
|
+
|
272
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
273
|
+
| .hello. world qu.o.tes
|
274
|
+
INPUT
|
275
|
+
|.PP
|
276
|
+
|.RS
|
277
|
+
|.nf
|
278
|
+
|\\&.hello. world qu.o.tes
|
279
|
+
|.fi
|
280
|
+
|.RE
|
281
|
+
OUTPUT
|
282
|
+
end
|
283
|
+
|
284
|
+
it 'escapes single quotes at the beginning of lines in code blocks' do
|
285
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
286
|
+
| '
|
287
|
+
INPUT
|
288
|
+
|.PP
|
289
|
+
|.RS
|
290
|
+
|.nf
|
291
|
+
|\\&'
|
292
|
+
|.fi
|
293
|
+
|.RE
|
294
|
+
OUTPUT
|
295
|
+
|
296
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
297
|
+
| ''
|
298
|
+
INPUT
|
299
|
+
|.PP
|
300
|
+
|.RS
|
301
|
+
|.nf
|
302
|
+
|\\&''
|
303
|
+
|.fi
|
304
|
+
|.RE
|
305
|
+
OUTPUT
|
306
|
+
|
307
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
308
|
+
| '''
|
309
|
+
INPUT
|
310
|
+
|.PP
|
311
|
+
|.RS
|
312
|
+
|.nf
|
313
|
+
|\\&'''
|
314
|
+
|.fi
|
315
|
+
|.RE
|
316
|
+
OUTPUT
|
317
|
+
|
318
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
319
|
+
| 'hello' world qu'o'tes
|
320
|
+
INPUT
|
321
|
+
|.PP
|
322
|
+
|.RS
|
323
|
+
|.nf
|
324
|
+
|\\&'hello' world qu'o'tes
|
325
|
+
|.fi
|
326
|
+
|.RE
|
327
|
+
OUTPUT
|
328
|
+
end
|
329
|
+
|
238
330
|
it 'renders emphasis' do
|
239
331
|
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
240
332
|
|just *some paragraph*
|
@@ -423,7 +515,7 @@ describe 'roff engine' do
|
|
423
515
|
| spanning
|
424
516
|
| **multiple**
|
425
517
|
|> lines
|
426
|
-
|with 4
|
518
|
+
|with 4\\-space indent
|
427
519
|
|.fi
|
428
520
|
|.RE
|
429
521
|
OUTPUT
|
@@ -463,7 +555,7 @@ describe 'roff engine' do
|
|
463
555
|
| _ __/ __ \\\\ __/ /_/
|
464
556
|
| / /_/ /_/ / / / ,\\\\
|
465
557
|
| \\\\__/\\\\____/_/ /_/|_\\\\
|
466
|
-
|
|
558
|
+
| >>>\\-\\-\\-\\-\\-\\->
|
467
559
|
|.fi
|
468
560
|
|.RE
|
469
561
|
OUTPUT
|
@@ -769,7 +861,7 @@ describe 'roff engine' do
|
|
769
861
|
|.PP
|
770
862
|
|.RS
|
771
863
|
|.nf
|
772
|
-
|<a class="md2man
|
864
|
+
|<a class="md2man\\-xref" href="../man3/printf.3.html">
|
773
865
|
|.BR printf (3)</a>
|
774
866
|
|.fi
|
775
867
|
|.RE
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: md2man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
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: 2014-
|
11
|
+
date: 2014-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binman
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: redcarpet
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '5.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '10.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '10.1'
|
69
69
|
description: Converts markdown documents into UNIX manual pages.
|
@@ -76,7 +76,7 @@ executables:
|
|
76
76
|
extensions: []
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
|
-
- .gitignore
|
79
|
+
- ".gitignore"
|
80
80
|
- EXAMPLE.markdown
|
81
81
|
- EXAMPLE.png
|
82
82
|
- Gemfile
|
@@ -96,25 +96,25 @@ files:
|
|
96
96
|
- lib/md2man/roff.rb
|
97
97
|
- lib/md2man/roff/engine.rb
|
98
98
|
- lib/md2man/version.rb
|
99
|
+
- man/index.html
|
100
|
+
- man/man0/README.html
|
99
101
|
- man/man0/README.markdown
|
102
|
+
- man/man0/VERSION.html
|
100
103
|
- man/man0/VERSION.markdown
|
101
|
-
- man/
|
102
|
-
- md2man.
|
103
|
-
- test/md2man/html_test.rb
|
104
|
-
- test/md2man/roff_test.rb
|
105
|
-
- test/test_helper.rb
|
104
|
+
- man/man1/md2man-html.1
|
105
|
+
- man/man1/md2man-html.1.html
|
106
106
|
- man/man1/md2man-rake.1
|
107
|
+
- man/man1/md2man-rake.1.html
|
107
108
|
- man/man1/md2man-roff.1
|
108
|
-
- man/man1/md2man-html.1
|
109
|
-
- man/man5/md2man.5
|
110
|
-
- man/index.html
|
111
109
|
- man/man1/md2man-roff.1.html
|
112
|
-
- man/
|
113
|
-
- man/man1/md2man-html.1.html
|
110
|
+
- man/man5/md2man.5
|
114
111
|
- man/man5/md2man.5.html
|
115
|
-
- man/
|
116
|
-
- man/man0/README.html
|
112
|
+
- man/man5/md2man.5.markdown
|
117
113
|
- man/style.css
|
114
|
+
- md2man.gemspec
|
115
|
+
- test/md2man/html_test.rb
|
116
|
+
- test/md2man/roff_test.rb
|
117
|
+
- test/test_helper.rb
|
118
118
|
homepage: http://github.com/sunaku/md2man
|
119
119
|
licenses:
|
120
120
|
- ISC
|
@@ -125,17 +125,17 @@ require_paths:
|
|
125
125
|
- lib
|
126
126
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- -
|
128
|
+
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: 1.9.1
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
requirements:
|
133
|
-
- -
|
133
|
+
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.2.2
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: markdown to manpage
|