md2man 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba2cb14fc6bc77e87921faf1be24560578383756
4
- data.tar.gz: 61717778f8a1c0566b89e0a5d8cc773b67ad72c7
3
+ metadata.gz: 82b0ddc434ba47e852663dab842cdf93dc5b1773
4
+ data.tar.gz: 89f55d53772ed2f777ad8f8f52ecfc257c60da1f
5
5
  SHA512:
6
- metadata.gz: 8dbcb51cc2c8c4db1bca6e71e38bfbd1cdd1c57cd2cae6c2cd68706b36381c39758ae2f6e5b272512c91853f1239fa992e956843304be0cf31db93dcb4ba52a2
7
- data.tar.gz: 1654542cc6239ba4662a8ce8a83192860265e6d3f4e2af854bacd0e02404b6eef336b68691cd8ba5fd28bb405aa7e3540127fc0959af75faad5f2a71b3bab9d0
6
+ metadata.gz: 986377215f13ba199fc4bce1e6b146c8e6ebb3da72c412e96bfe925c89b0cd4a1a109506c86522ffed6f7c558502abda77e7004045289b6370ae328e66175318
7
+ data.tar.gz: d380cce3a30f90f2a5f5bab88b120a5e7324037d076fe9bfe4da73fe0741acac42adcb85719f2b80419e60d9393ed29da427312fcc6605b1861420992279d02a
data/README.markdown CHANGED
@@ -3,10 +3,10 @@
3
3
  md2man is a Ruby library and a set of command-line programs that convert
4
4
  [Markdown] into UNIX manual pages (both [roff] and HTML) using [Redcarpet].
5
5
 
6
- * Package: <https://rubygems.org/gems/md2man>
7
- * Manuals: <https://sunaku.github.io/md2man>
6
+ * Manuals: <https://sunaku.github.io/md2man/man>
8
7
  * Sources: <https://github.com/sunaku/md2man>
9
8
  * Support: <https://github.com/sunaku/md2man/issues>
9
+ * Package: <https://rubygems.org/gems/md2man>
10
10
 
11
11
  ## Features
12
12
 
@@ -153,7 +153,7 @@ Add this snippet to your gemspec file:
153
153
 
154
154
  s.files += Dir['man/man?/*.?'] # UNIX man pages
155
155
  s.files += Dir['man/**/*.{html,css,js}'] # HTML man pages
156
- s.add_development_dependency 'md2man', '~> 2.0'
156
+ s.add_development_dependency 'md2man', '~> 3.0'
157
157
 
158
158
  Add this line to your Rakefile:
159
159
 
data/VERSION.markdown CHANGED
@@ -1,3 +1,26 @@
1
+ ## Version 3.0.1 (2014-07-16)
2
+
3
+ This release restores Mac OS X support and fixes a permalink generation bug.
4
+
5
+ ### Patch:
6
+
7
+ * GH-13: man(1) on Mac OS X could not display URLs.
8
+
9
+ The version of groff on Mac OS X is too old: it lacks the an-ext.tmac
10
+ macro package that defines styles for email addresses and general URLs.
11
+
12
+ $ groff --version
13
+ ...
14
+ GNU grops (groff) version 1.19.2
15
+ GNU troff (groff) version 1.19.2
16
+
17
+ This patch drops those URL macros in favor of simpler angled brackets.
18
+
19
+ Thanks to Sorin Ionescu for reporting this issue in GH-13:
20
+ https://github.com/sunaku/md2man/issues/13
21
+
22
+ * md2man-html(1): cross references were escaped in heading permalink IDs.
23
+
1
24
  ## Version 3.0.0 (2014-06-22)
2
25
 
3
26
  This release changes md2man-html(1) heading permalinks to follow GitHub style:
data/bin/md2man-html CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # MD2MAN-HTML 1 2014-06-22 3.0.0
4
+ # MD2MAN-HTML 1 2014-07-16 3.0.1
5
5
 
6
6
  ## NAME
7
7
 
data/bin/md2man-rake CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # MD2MAN-RAKE 1 2014-06-22 3.0.0
4
+ # MD2MAN-RAKE 1 2014-07-16 3.0.1
5
5
 
6
6
  ## NAME
7
7
 
data/bin/md2man-roff CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # MD2MAN-ROFF 1 2014-06-22 3.0.0
4
+ # MD2MAN-ROFF 1 2014-07-16 3.0.1
5
5
 
6
6
  ## NAME
7
7
 
@@ -74,8 +74,6 @@ protected
74
74
  private
75
75
 
76
76
  def encode_references text
77
- # the [^\n\S] captures all non-newline whitespace
78
- # basically, it's meant to be \s but excluding \n
79
77
  text.gsub(/(?<page>[\w\-\.]+)\((?<section>\w+)\)/) do
80
78
  match = $~
81
79
  key = encode(match)
@@ -86,7 +84,9 @@ private
86
84
 
87
85
  def decode_references text
88
86
  @references.delete_if do |key, match|
89
- text.sub! /#{Regexp.escape key}(?<addendum>\S*[^\n\S]*)/ do
87
+ # the [^\S\n] captures all non-newline whitespace
88
+ # basically, it's meant to be \s but excluding \n
89
+ text.sub! /#{Regexp.escape key}(?<addendum>\S*[^\S\n]*)/ do
90
90
  reference match, $~
91
91
  end
92
92
  end
data/lib/md2man/html.rb CHANGED
@@ -44,6 +44,9 @@ module Md2Man::HTML
44
44
  end.compact.join(' ')
45
45
  end
46
46
 
47
+ # decode here, since we will emit this heading below as raw HTML anyway
48
+ text = decode_references(text)
49
+
47
50
  # strip all HTML tags, squeeze all non-word characters, and lowercase it
48
51
  id = text.gsub(/<.+?>/, '-').gsub(/\W+/, '-').gsub(/^-|-$/, '').downcase
49
52
 
data/lib/md2man/roff.rb CHANGED
@@ -177,11 +177,7 @@ module Md2Man::Roff
177
177
  end
178
178
 
179
179
  def autolink link, link_type
180
- if link_type == :email
181
- "\n.MT #{link.chomp}\n.ME "
182
- else
183
- "\n.UR #{link.chomp}\n.UE "
184
- end
180
+ "\n\\[la]#{link.chomp}\\[ra]"
185
181
  end
186
182
 
187
183
  def image link, title, alt_text
@@ -1,3 +1,3 @@
1
1
  module Md2Man
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
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 3.0.0 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 3.0.1 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 3.0.0 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 3.0.1 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]-->
@@ -10,10 +10,10 @@
10
10
  <body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man0">man0</a>/README</span></div></div><div class="container-fluid"><h1 id="md2man-markdown-to-manpage"><a name="md2man-markdown-to-manpage" href="#md2man-markdown-to-manpage" class="md2man-permalink" title="permalink"></a><span class="md2man-title">md2man</span> <span class="md2man-section">-</span> <span class="md2man-date">markdown</span> <span class="md2man-source">to</span> <span class="md2man-manual">manpage</span></h1><p>md2man is a Ruby library and a set of command-line programs that convert
11
11
  <a href="http://daringfireball.net/projects/markdown/">Markdown</a> into UNIX manual pages (both <a href="http://troff.org">roff</a> and HTML) using <a href="https://github.com/vmg/redcarpet">Redcarpet</a>.</p>
12
12
  <ul>
13
- <li>Package: <a href="https://rubygems.org/gems/md2man">https://rubygems.org/gems/md2man</a></li>
14
- <li>Manuals: <a href="https://sunaku.github.io/md2man">https://sunaku.github.io/md2man</a></li>
13
+ <li>Manuals: <a href="https://sunaku.github.io/md2man/man">https://sunaku.github.io/md2man/man</a></li>
15
14
  <li>Sources: <a href="https://github.com/sunaku/md2man">https://github.com/sunaku/md2man</a></li>
16
15
  <li>Support: <a href="https://github.com/sunaku/md2man/issues">https://github.com/sunaku/md2man/issues</a></li>
16
+ <li>Package: <a href="https://rubygems.org/gems/md2man">https://rubygems.org/gems/md2man</a></li>
17
17
  </ul>
18
18
  <h2 id="features"><a name="features" href="#features" class="md2man-permalink" title="permalink"></a>Features</h2>
19
19
  <ul>
@@ -117,7 +117,7 @@ your_html_output = <a class="md2man-reference">engine.render(your_markdown_input
117
117
  <h4 id="inside-a-ruby-script-2"><a name="inside-a-ruby-script-2" href="#inside-a-ruby-script-2" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h4><p>Add this snippet to your gemspec file:</p>
118
118
  <pre><code>s.files += Dir[&#39;man/man?/*.?&#39;] # UNIX man pages
119
119
  s.files += Dir[&#39;man/**/*.{html,css,js}&#39;] # HTML man pages
120
- s.add_development_dependency &#39;md2man&#39;, &#39;~&gt; 2.0&#39;
120
+ s.add_development_dependency &#39;md2man&#39;, &#39;~&gt; 3.0&#39;
121
121
  </code></pre>
122
122
  <p>Add this line to your Rakefile:</p>
123
123
  <pre><code>require &#39;md2man/rakefile&#39;
@@ -3,10 +3,10 @@
3
3
  md2man is a Ruby library and a set of command-line programs that convert
4
4
  [Markdown] into UNIX manual pages (both [roff] and HTML) using [Redcarpet].
5
5
 
6
- * Package: <https://rubygems.org/gems/md2man>
7
- * Manuals: <https://sunaku.github.io/md2man>
6
+ * Manuals: <https://sunaku.github.io/md2man/man>
8
7
  * Sources: <https://github.com/sunaku/md2man>
9
8
  * Support: <https://github.com/sunaku/md2man/issues>
9
+ * Package: <https://rubygems.org/gems/md2man>
10
10
 
11
11
  ## Features
12
12
 
@@ -153,7 +153,7 @@ Add this snippet to your gemspec file:
153
153
 
154
154
  s.files += Dir['man/man?/*.?'] # UNIX man pages
155
155
  s.files += Dir['man/**/*.{html,css,js}'] # HTML man pages
156
- s.add_development_dependency 'md2man', '~> 2.0'
156
+ s.add_development_dependency 'md2man', '~> 3.0'
157
157
 
158
158
  Add this line to your Rakefile:
159
159
 
@@ -2,12 +2,25 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 3.0.0 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 3.0.1 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-3-0-0-2014-06-22"><a name="version-3-0-0-2014-06-22" href="#version-3-0-0-2014-06-22" class="md2man-permalink" title="permalink"></a>Version 3.0.0 (2014-06-22)</h2><p>This release changes <a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a> heading permalinks to follow GitHub style:
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-3-0-1-2014-07-16"><a name="version-3-0-1-2014-07-16" href="#version-3-0-1-2014-07-16" class="md2man-permalink" title="permalink"></a>Version 3.0.1 (2014-07-16)</h2><p>This release restores Mac OS X support and fixes a permalink generation bug.</p><h3 id="patch"><a name="patch" href="#patch" class="md2man-permalink" title="permalink"></a>Patch:</h3>
11
+ <ul>
12
+ <li><p>GH-13: <a class="md2man-reference">man(1)</a> on Mac OS X could not display URLs.</p><p>The version of groff on Mac OS X is too old: it lacks the an-ext.tmac
13
+ macro package that defines styles for email addresses and general URLs.</p>
14
+ <pre><code>$ groff --version
15
+ ...
16
+ GNU grops (groff) version 1.19.2
17
+ GNU troff (groff) version 1.19.2
18
+ </code></pre>
19
+ <p>This patch drops those URL macros in favor of simpler angled brackets.</p><p>Thanks to Sorin Ionescu for reporting this issue in GH-13:
20
+ <a href="https://github.com/sunaku/md2man/issues/13">https://github.com/sunaku/md2man/issues/13</a></p></li>
21
+ <li><p><a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a>: cross references were escaped in heading permalink IDs.</p></li>
22
+ </ul>
23
+ <h2 id="version-3-0-0-2014-06-22"><a name="version-3-0-0-2014-06-22" href="#version-3-0-0-2014-06-22" class="md2man-permalink" title="permalink"></a>Version 3.0.0 (2014-06-22)</h2><p>This release changes <a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a> heading permalinks to follow GitHub style:
11
24
  unique, lowercase, and squeezed and stripped of HTML tags and non-word chars.
12
25
  In addition, it renames the <code>md2man-xref</code> CSS class to <code>md2man-reference</code>.</p><p>Please make sure to update any existing bookmarks and/or hyperlinks you may
13
26
  have for jumping to specific locations in your HTML manuals after upgrading.</p><h3 id="major"><a name="major" href="#major" class="md2man-permalink" title="permalink"></a>Major:</h3>
@@ -17,7 +30,7 @@ have for jumping to specific locations in your HTML manuals after upgrading.</p>
17
30
  <li><p>Make permalink anchors unique by appending a count in <a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a>.</p></li>
18
31
  <li><p>Rename <code>md2man-xref</code> CSS class to <code>md2man-reference</code> in <a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a>.</p></li>
19
32
  </ul>
20
- <h2 id="version-2-1-1-2014-06-21"><a name="version-2-1-1-2014-06-21" href="#version-2-1-1-2014-06-21" class="md2man-permalink" title="permalink"></a>Version 2.1.1 (2014-06-21)</h2><h3 id="patch"><a name="patch" href="#patch" class="md2man-permalink" title="permalink"></a>Patch:</h3>
33
+ <h2 id="version-2-1-1-2014-06-21"><a name="version-2-1-1-2014-06-21" href="#version-2-1-1-2014-06-21" class="md2man-permalink" title="permalink"></a>Version 2.1.1 (2014-06-21)</h2><h3 id="patch-1"><a name="patch-1" href="#patch-1" class="md2man-permalink" title="permalink"></a>Patch:</h3>
21
34
  <ul>
22
35
  <li><p>Bootstrap CSS failed to load for HTML manuals served under HTTPS.
23
36
  See <a href="https://github.com/sunaku/readably/pull/3">https://github.com/sunaku/readably/pull/3</a> for the details.</p></li>
@@ -47,7 +60,7 @@ top-level heading in HTML <code>&lt;span&gt;</code> elements with stylable CSS c
47
60
  <ul>
48
61
  <li><p><a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> now documents the special <code>.TH</code> format of top-level headings.</p><p>Thanks to Nick Fagerlund for requesting this documentation in <a href="https://github.com/sunaku/md2man/issues/15">GH-15</a>.</p></li>
49
62
  </ul>
50
- <h2 id="version-2-0-4-2014-04-26"><a name="version-2-0-4-2014-04-26" href="#version-2-0-4-2014-04-26" class="md2man-permalink" title="permalink"></a>Version 2.0.4 (2014-04-26)</h2><h3 id="patch-1"><a name="patch-1" href="#patch-1" class="md2man-permalink" title="permalink"></a>Patch:</h3>
63
+ <h2 id="version-2-0-4-2014-04-26"><a name="version-2-0-4-2014-04-26" href="#version-2-0-4-2014-04-26" class="md2man-permalink" title="permalink"></a>Version 2.0.4 (2014-04-26)</h2><h3 id="patch-2"><a name="patch-2" href="#patch-2" class="md2man-permalink" title="permalink"></a>Patch:</h3>
51
64
  <ul>
52
65
  <li><p>GH-16: Redcarpet 3.1 added a third parameter to its <code>header()</code> method.
53
66
  This raised an ArgumentError on &quot;wrong number of arguments (3 for 2)&quot;.</p><p>Thanks to zimbatm for contributing this patch.</p></li>
@@ -55,7 +68,7 @@ This raised an ArgumentError on &quot;wrong number of arguments (3 for 2)&quot;.
55
68
  This fixes a bug where lines beginning with periods or single quotes
56
69
  did not appear when <a class="md2man-reference" href="../man1/md2man-roff.1.html">md2man-roff(1)</a> output was rendered using <a class="md2man-reference">man(1)</a>.</p><p>Thanks to zimbatm for reporting this bug and suggesting how to fix it.</p></li>
57
70
  </ul>
58
- <h2 id="version-2-0-3-2014-01-16"><a name="version-2-0-3-2014-01-16" href="#version-2-0-3-2014-01-16" class="md2man-permalink" title="permalink"></a>Version 2.0.3 (2014-01-16)</h2><h3 id="patch-2"><a name="patch-2" href="#patch-2" class="md2man-permalink" title="permalink"></a>Patch:</h3>
71
+ <h2 id="version-2-0-3-2014-01-16"><a name="version-2-0-3-2014-01-16" href="#version-2-0-3-2014-01-16" class="md2man-permalink" title="permalink"></a>Version 2.0.3 (2014-01-16)</h2><h3 id="patch-3"><a name="patch-3" href="#patch-3" class="md2man-permalink" title="permalink"></a>Patch:</h3>
59
72
  <ul>
60
73
  <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>
61
74
  </ul>
@@ -1,3 +1,26 @@
1
+ ## Version 3.0.1 (2014-07-16)
2
+
3
+ This release restores Mac OS X support and fixes a permalink generation bug.
4
+
5
+ ### Patch:
6
+
7
+ * GH-13: man(1) on Mac OS X could not display URLs.
8
+
9
+ The version of groff on Mac OS X is too old: it lacks the an-ext.tmac
10
+ macro package that defines styles for email addresses and general URLs.
11
+
12
+ $ groff --version
13
+ ...
14
+ GNU grops (groff) version 1.19.2
15
+ GNU troff (groff) version 1.19.2
16
+
17
+ This patch drops those URL macros in favor of simpler angled brackets.
18
+
19
+ Thanks to Sorin Ionescu for reporting this issue in GH-13:
20
+ https://github.com/sunaku/md2man/issues/13
21
+
22
+ * md2man-html(1): cross references were escaped in heading permalink IDs.
23
+
1
24
  ## Version 3.0.0 (2014-06-22)
2
25
 
3
26
  This release changes md2man-html(1) heading permalinks to follow GitHub style:
@@ -1,4 +1,4 @@
1
- .TH MD2MAN\-HTML 1 2014\-06\-22 3.0.0
1
+ .TH MD2MAN\-HTML 1 2014\-07\-16 3.0.1
2
2
  .SH NAME
3
3
  .PP
4
4
  md2man\-html \- convert
@@ -2,12 +2,12 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 3.0.0 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 3.0.1 https://github.com/sunaku/md2man" />
6
6
  <title>md2man-html(1) &mdash; 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-06-22-3-0-0"><a name="md2man-html-1-2014-06-22-3-0-0" href="#md2man-html-1-2014-06-22-3-0-0" class="md2man-permalink" title="permalink"></a><span class="md2man-title">MD2MAN-HTML</span> <span class="md2man-section">1</span> <span class="md2man-date">2014-06-22</span> <span class="md2man-source">3.0.0</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>md2man-html - convert <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-reference">markdown(7)</a> into HTML</p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>md2man-html</code> [<em>OPTION</em>]... [<em>FILE</em>]</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p>This program converts <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-reference">markdown(7)</a> input from the given
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-07-16-3-0-1"><a name="md2man-html-1-2014-07-16-3-0-1" href="#md2man-html-1-2014-07-16-3-0-1" class="md2man-permalink" title="permalink"></a><span class="md2man-title">MD2MAN-HTML</span> <span class="md2man-section">1</span> <span class="md2man-date">2014-07-16</span> <span class="md2man-source">3.0.1</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>md2man-html - convert <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-reference">markdown(7)</a> into HTML</p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>md2man-html</code> [<em>OPTION</em>]... [<em>FILE</em>]</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p>This program converts <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-reference">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="top-level-headings"><a name="top-level-headings" href="#top-level-headings" class="md2man-permalink" title="permalink"></a>Top-level headings</h3><p>Each component of the <code>.TH</code> directive in <a class="md2man-reference">roff(7)</a>, described under &quot;Top-level
13
13
  headings&quot; in <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a>, is wrapped in stylable <code>&lt;span&gt;</code> elements as follows:</p>
@@ -1,4 +1,4 @@
1
- .TH MD2MAN\-RAKE 1 2014\-06\-22 3.0.0
1
+ .TH MD2MAN\-RAKE 1 2014\-07\-16 3.0.1
2
2
  .SH NAME
3
3
  .PP
4
4
  md2man\-rake \- run
@@ -2,12 +2,12 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 3.0.0 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 3.0.1 https://github.com/sunaku/md2man" />
6
6
  <title>md2man-rake(1) &mdash; 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-06-22-3-0-0"><a name="md2man-rake-1-2014-06-22-3-0-0" href="#md2man-rake-1-2014-06-22-3-0-0" class="md2man-permalink" title="permalink"></a><span class="md2man-title">MD2MAN-RAKE</span> <span class="md2man-section">1</span> <span class="md2man-date">2014-06-22</span> <span class="md2man-source">3.0.0</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>md2man-rake - run <a class="md2man-reference">rake(1)</a> tasks from <a class="md2man-reference">md2man(1)</a></p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>md2man-rake</code> [<em>OPTION</em>]... [<em>TASK</em>]...</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p>This program lets you run <a class="md2man-reference">rake(1)</a> tasks provided by <a class="md2man-reference">md2man(1)</a> without having
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-07-16-3-0-1"><a name="md2man-rake-1-2014-07-16-3-0-1" href="#md2man-rake-1-2014-07-16-3-0-1" class="md2man-permalink" title="permalink"></a><span class="md2man-title">MD2MAN-RAKE</span> <span class="md2man-section">1</span> <span class="md2man-date">2014-07-16</span> <span class="md2man-source">3.0.1</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>md2man-rake - run <a class="md2man-reference">rake(1)</a> tasks from <a class="md2man-reference">md2man(1)</a></p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>md2man-rake</code> [<em>OPTION</em>]... [<em>TASK</em>]...</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p>This program lets you run <a class="md2man-reference">rake(1)</a> tasks provided by <a class="md2man-reference">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 &#39;md2man/rakefile&#39;
13
13
  </code></pre>
@@ -1,4 +1,4 @@
1
- .TH MD2MAN\-ROFF 1 2014\-06\-22 3.0.0
1
+ .TH MD2MAN\-ROFF 1 2014\-07\-16 3.0.1
2
2
  .SH NAME
3
3
  .PP
4
4
  md2man\-roff \- convert
@@ -24,9 +24,7 @@ If \fIFILE\fP is not given, then the standard input stream is read in its place.
24
24
  .SS Limitations
25
25
  .PP
26
26
  This program does not convert the following Redcarpet
27
- .UR https://github.com/vmg/redcarpet
28
- .UE
29
- nodes into
27
+ \[la]https://github.com/vmg/redcarpet\[ra] nodes into
30
28
  .BR roff (7):
31
29
  .RS
32
30
  .IP \(bu 2
@@ -2,12 +2,12 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 3.0.0 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 3.0.1 https://github.com/sunaku/md2man" />
6
6
  <title>md2man-roff(1) &mdash; 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-06-22-3-0-0"><a name="md2man-roff-1-2014-06-22-3-0-0" href="#md2man-roff-1-2014-06-22-3-0-0" class="md2man-permalink" title="permalink"></a><span class="md2man-title">MD2MAN-ROFF</span> <span class="md2man-section">1</span> <span class="md2man-date">2014-06-22</span> <span class="md2man-source">3.0.0</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>md2man-roff - convert <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-reference">markdown(7)</a> into <a class="md2man-reference">roff(7)</a></p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>md2man-roff</code> [<em>OPTION</em>]... [<em>FILE</em>]</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p>This program converts <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-reference">markdown(7)</a> input from the given
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-07-16-3-0-1"><a name="md2man-roff-1-2014-07-16-3-0-1" href="#md2man-roff-1-2014-07-16-3-0-1" class="md2man-permalink" title="permalink"></a><span class="md2man-title">MD2MAN-ROFF</span> <span class="md2man-section">1</span> <span class="md2man-date">2014-07-16</span> <span class="md2man-source">3.0.1</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>md2man-roff - convert <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-reference">markdown(7)</a> into <a class="md2man-reference">roff(7)</a></p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>md2man-roff</code> [<em>OPTION</em>]... [<em>FILE</em>]</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p>This program converts <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a> flavored <a class="md2man-reference">markdown(7)</a> input from the given
11
11
  <em>FILE</em> into <a class="md2man-reference">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"><a name="limitations" href="#limitations" class="md2man-permalink" title="permalink"></a>Limitations</h3><p>This program does not convert the following <a href="https://github.com/vmg/redcarpet">Redcarpet</a> nodes into <a class="md2man-reference">roff(7)</a>:</p>
13
13
  <ul>
data/man/man5/md2man.5 CHANGED
@@ -1,4 +1,4 @@
1
- .TH MD2MAN 5 2014\-06\-22 3.0.0
1
+ .TH MD2MAN 5 2014\-07\-16 3.0.1
2
2
  .SH NAME
3
3
  .PP
4
4
  md2man \- manual page flavoring for the
@@ -7,9 +7,7 @@ file format
7
7
  .SH DESCRIPTION
8
8
  .PP
9
9
  md2man
10
- .UR https://github.com/sunaku/md2man
11
- .UE
12
- makes the
10
+ \[la]https://github.com/sunaku/md2man\[ra] makes the
13
11
  .BR markdown (7)
14
12
  file format friendly for writing UNIX manual
15
13
  pages by extending its syntax, semantics, and assumed processing extensions.
@@ -117,9 +115,7 @@ Any subsequent top\-level headings are treated as second\-level \fB\fC<h2>\fR he
117
115
  .SS Extensions
118
116
  .PP
119
117
  md2man enables the following Redcarpet
120
- .UR https://github.com/vmg/redcarpet
121
- .UE
122
- extensions while reading
118
+ \[la]https://github.com/vmg/redcarpet\[ra] extensions while reading
123
119
  .BR markdown (7):
124
120
  .RS
125
121
  .IP \(bu 2
@@ -2,12 +2,12 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 3.0.0 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 3.0.1 https://github.com/sunaku/md2man" />
6
6
  <title>md2man(5) &mdash; 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-06-22-3-0-0"><a name="md2man-5-2014-06-22-3-0-0" href="#md2man-5-2014-06-22-3-0-0" class="md2man-permalink" title="permalink"></a><span class="md2man-title">MD2MAN</span> <span class="md2man-section">5</span> <span class="md2man-date">2014-06-22</span> <span class="md2man-source">3.0.0</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>md2man - manual page flavoring for the <a class="md2man-reference">markdown(7)</a> file format</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p><a href="https://github.com/sunaku/md2man">md2man</a> makes the <a class="md2man-reference">markdown(7)</a> file format friendly for writing UNIX manual
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-07-16-3-0-1"><a name="md2man-5-2014-07-16-3-0-1" href="#md2man-5-2014-07-16-3-0-1" class="md2man-permalink" title="permalink"></a><span class="md2man-title">MD2MAN</span> <span class="md2man-section">5</span> <span class="md2man-date">2014-07-16</span> <span class="md2man-source">3.0.1</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>md2man - manual page flavoring for the <a class="md2man-reference">markdown(7)</a> file format</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p><a href="https://github.com/sunaku/md2man">md2man</a> makes the <a class="md2man-reference">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"><a name="syntax" href="#syntax" class="md2man-permalink" title="permalink"></a>Syntax</h3><p>md2man extends <a class="md2man-reference">markdown(7)</a> syntax by defining three kinds of paragraphs.</p>
12
12
  <pre><code>This is a
13
13
  normal
@@ -1,4 +1,4 @@
1
- # MD2MAN 5 2014-06-22 3.0.0
1
+ # MD2MAN 5 2014-07-16 3.0.1
2
2
 
3
3
  ## NAME
4
4
 
@@ -133,7 +133,7 @@ describe 'html engine' do
133
133
  OUTPUT
134
134
  end
135
135
 
136
- it 'adds ID attributes on headings for permalinking' do
136
+ it 'adds permalinks to headings' do
137
137
  @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
138
138
  |# foo *BAR*
139
139
  |## bar BAZ
@@ -156,4 +156,18 @@ describe 'html engine' do
156
156
  <h4 id="bar-baz-4"><a name="bar-baz-4" href="#bar-baz-4" class="md2man-permalink" title="permalink"></a>-bar--BAZ---</h4>
157
157
  OUTPUT
158
158
  end
159
+
160
+ it 'adds permalinks to headings that contain man page references' do
161
+ @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
162
+ |## here is-a-reference(3) to another man page
163
+ |
164
+ |here is a paragraph containing is-a-reference(3) again
165
+ |
166
+ |here is another paragraph containing is-a-reference(3) yet again
167
+ INPUT
168
+ <h2 id="here-is-a-reference-3-to-another-man-page"><a name="here-is-a-reference-3-to-another-man-page" href="#here-is-a-reference-3-to-another-man-page" class="md2man-permalink" title="permalink"></a>here <a class="md2man-reference" href="../man3/is-a-reference.3.html">is-a-reference(3)</a> to another man page</h2>\
169
+ <p>here is a paragraph containing <a class="md2man-reference" href="../man3/is-a-reference.3.html">is-a-reference(3)</a> again</p>\
170
+ <p>here is another paragraph containing <a class="md2man-reference" href="../man3/is-a-reference.3.html">is-a-reference(3)</a> yet again</p>
171
+ OUTPUT
172
+ end
159
173
  end
@@ -587,8 +587,7 @@ describe 'roff engine' do
587
587
  INPUT
588
588
  |.PP
589
589
  |Send me
590
- |.MT foo@bar.baz
591
- |.ME , e\\-mail.
590
+ |\\[la]foo@bar.baz\\[ra], e\\-mail.
592
591
  OUTPUT
593
592
 
594
593
  @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
@@ -596,8 +595,7 @@ describe 'roff engine' do
596
595
  INPUT
597
596
  |.PP
598
597
  |Take me
599
- |.UR http://myself
600
- |.UE , somewhere.
598
+ |\\[la]http://myself\\[ra], somewhere.
601
599
  OUTPUT
602
600
 
603
601
  @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
@@ -605,9 +603,7 @@ describe 'roff engine' do
605
603
  INPUT
606
604
  |.PP
607
605
  |Mail me#{SPACE}
608
- |.MT foo@bar.baz
609
- |.ME
610
- |now.
606
+ |\\[la]foo@bar.baz\\[ra] now.
611
607
  OUTPUT
612
608
 
613
609
  @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
@@ -615,9 +611,7 @@ describe 'roff engine' do
615
611
  INPUT
616
612
  |.PP
617
613
  |Take me#{SPACE}
618
- |.UR http://www.somewhere
619
- |.UE
620
- |now.
614
+ |\\[la]http://www.somewhere\\[ra] now.
621
615
  OUTPUT
622
616
  end
623
617
 
@@ -921,8 +915,7 @@ describe 'roff engine' do
921
915
  |[Obligatory screenshot of#{SPACE}
922
916
  |.BR md2man-roff (1)#{SPACE}
923
917
  |in action!](
924
- |.UR https://raw.github.com/sunaku/md2man/master/EXAMPLE.png
925
- |.UE )
918
+ |\\[la]https://raw.github.com/sunaku/md2man/master/EXAMPLE.png\\[ra])
926
919
  OUTPUT
927
920
  end
928
921
 
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: 3.0.0
4
+ version: 3.0.1
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-06-23 00:00:00.000000000 Z
11
+ date: 2014-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: binman