md2man 1.6.2 → 2.0.0

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.
data/man/man0/README.html CHANGED
@@ -2,68 +2,64 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 1.6.2 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 2.0.0 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]-->
9
9
  </head>
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"><div class="manpage"><h1 id="md2man-markdown-to-manpage">md2man - markdown to manpage</h1><p>md2man is a Ruby library and command-line program that converts <a href="http://daringfireball.net/projects/markdown/">Markdown</a>
11
- documents 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><h2 id="Features">Features</h2>
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">md2man - markdown to manpage</h1><p>md2man is a Ruby library and a set of command-line programs that convert
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><h2 id="Features">Features</h2>
12
12
  <ul>
13
13
  <li><p>Formats tagged and indented paragraphs (see &quot;document format&quot; below).</p></li>
14
14
  <li><p>Translates all HTML4 and XHTML1 entities into native <a href="http://troff.org">roff</a> equivalents.</p></li>
15
15
  <li><p>Supports markdown extensions such as <a href="http://michelf.com/projects/php-markdown/extra/#table">PHP Markdown Extra tables</a>.</p></li>
16
- <li><p>Usable from the command line as a filter in a UNIX pipeline.</p></li>
16
+ <li><p>Usable from the command line as a filter in a UNIX command pipeline.</p></li>
17
17
  </ul>
18
- <h3 id="Demonstration">Demonstration</h3><p>Try converting <a href="https://raw.github.com/sunaku/md2man/master/EXAMPLE.markdown">this example Markdown file</a> into a UNIX manual page:</p><pre><code>md2man EXAMPLE.markdown &gt; EXAMPLE.1
18
+ <h3 id="Demonstration">Demonstration</h3><p>Try converting <a href="https://raw.github.com/sunaku/md2man/master/EXAMPLE.markdown">this example Markdown file</a> into a UNIX manual page:</p>
19
+ <pre><code>md2man-roff EXAMPLE.markdown &gt; EXAMPLE.1
19
20
  man -l EXAMPLE.1
20
- </code></pre><p><img src="https://raw.github.com/sunaku/md2man/master/EXAMPLE.png" alt="Obligatory screenshot of <a class="manpage-reference" href="../man1/md2man.1.html">md2man(1)</a> in action!"></p><h3 id="Limitations">Limitations</h3><p>At present, md2man does not translate the following <a href="https://github.com/vmg/redcarpet">Redcarpet</a> node types:</p>
21
- <ul>
22
- <li><code>block_html</code></li>
23
- <li><code>strikethrough</code></li>
24
- <li><code>superscript</code></li>
25
- <li><code>image</code></li>
26
- <li><code>raw_html</code></li>
27
- </ul>
28
- <p>It issues a warning when it encounters these instead. Patches are welcome!</p><h2 id="Installation">Installation</h2><pre><code>gem install md2man
29
- </code></pre><h3 id="Development">Development</h3><pre><code>git clone git://github.com/sunaku/md2man
21
+ </code></pre>
22
+ <p><img src="https://raw.github.com/sunaku/md2man/master/EXAMPLE.png" alt="Obligatory screenshot of md2man(1) in action!"></p><p>Also try converting <a href="https://raw.github.com/sunaku/md2man/master/EXAMPLE.markdown">that example Markdown file</a> into a web page:</p>
23
+ <pre><code>md2man-html EXAMPLE.markdown &gt; EXAMPLE.html
24
+ open EXAMPLE.html
25
+ </code></pre>
26
+ <h2 id="Installation">Installation</h2>
27
+ <pre><code>gem install md2man
28
+ </code></pre>
29
+ <h3 id="Development">Development</h3>
30
+ <pre><code>git clone git://github.com/sunaku/md2man
30
31
  cd md2man
31
32
  bundle install
32
- bundle exec md2man --help # run it directly
33
- bundle exec rake --tasks # packaging tasks
34
- </code></pre><h2 id="Usage">Usage</h2><h3 id="Document-format">Document format</h3><p>md2man extends <a href="http://daringfireball.net/projects/markdown/">Markdown</a> syntax in the following ways, as provisioned in the
35
- <code>Md2Man::Document</code> module and defined in its derivative <code>Md2Man::Roff</code> module:</p>
36
- <ul>
37
- <li><p>Paragraphs whose lines are all uniformly indented by two spaces are
38
- considered to be &quot;indented paragraphs&quot;. They are unindented accordingly
39
- before emission as <code>.IP</code> in the <a href="http://troff.org">roff</a> output.</p></li>
40
- <li><p>Paragraphs whose subsequent lines (all except the first) are uniformly
41
- indented by two spaces are considered to be a &quot;tagged paragraphs&quot;. They
42
- are unindented accordingly before emission as <code>.TP</code> in the <a href="http://troff.org">roff</a> output.</p></li>
43
- </ul>
44
- <p>md2man extends <a href="http://daringfireball.net/projects/markdown/">Markdown</a> semantics in the following ways:</p>
45
- <ul>
46
- <li>The first top-level heading (H1) found in the document is emitted as <code>.TH</code>
47
- in the <a class="manpage-reference">roff(7)</a> output to define the UNIX manual page&#39;s header and footer.
48
- Any subsequent top-level headings (H1) are treated as second-level (H2).</li>
49
- </ul>
50
- <h3 id="For-roff-output">For <a href="http://troff.org">roff</a> output</h3><h4 id="At-the-command-line">At the command line</h4><pre><code>md2man --help
51
- </code></pre><h4 id="Inside-a-Ruby-script">Inside a Ruby script</h4><p>Use the default renderer:</p><pre><code>require 'md2man'
33
+ bundle exec rake --tasks # packaging tasks
34
+ bundle exec md2man-roff --help # run it directly
35
+ bundle exec md2man-html --help # run it directly
36
+ </code></pre>
37
+ <h2 id="Usage">Usage</h2><h3 id="For-roff-output">For <a href="http://troff.org">roff</a> output</h3><h4 id="At-the-command-line">At the command line</h4><p>See <a class="md2man-xref" href="../man1/md2man-roff.1.html">md2man-roff(1)</a> manual:</p>
38
+ <pre><code>md2man-roff --help
39
+ </code></pre>
40
+ <h4 id="Inside-a-Ruby-script">Inside a Ruby script</h4><p>Use the default renderer:</p>
41
+ <pre><code>require &#39;md2man/roff/engine&#39;
52
42
 
53
- your_roff_output = Md2Man::ENGINE.render(your_markdown_input)
54
- </code></pre><p>Build your own renderer:</p><pre><code>require 'md2man'
43
+ your_roff_output = Md2Man::Roff::<a class="md2man-xref">ENGINE.render(your_markdown_input)</a>
44
+ </code></pre>
45
+ <p>Build your own renderer:</p>
46
+ <pre><code>require &#39;md2man/roff/engine&#39;
55
47
 
56
- engine = Redcarpet::Markdown.new(Md2Man::Engine, your_options_hash)
57
- your_roff_output = engine.render(your_markdown_input)
58
- </code></pre><p>Define your own renderer:</p><pre><code>require 'md2man'
48
+ engine = Redcarpet::Markdown.new(Md2Man::Roff::Engine, your_options_hash)
49
+ your_roff_output = <a class="md2man-xref">engine.render(your_markdown_input)</a>
50
+ </code></pre>
51
+ <p>Define your own renderer:</p>
52
+ <pre><code>require &#39;md2man/roff/engine&#39;
59
53
 
60
- class YourManpageRenderer &lt; Md2Man::Engine
54
+ class YourManpageRenderer &lt; Md2Man::Roff::Engine
61
55
  # ... your stuff here ...
62
56
  end
63
57
 
64
58
  engine = Redcarpet::Markdown.new(YourManpageRenderer, your_options_hash)
65
- your_roff_output = engine.render(your_markdown_input)
66
- </code></pre><p>Mix-in your own renderer:</p><pre><code>require 'md2man'
59
+ your_roff_output = <a class="md2man-xref">engine.render(your_markdown_input)</a>
60
+ </code></pre>
61
+ <p>Mix-in your own renderer:</p>
62
+ <pre><code>require &#39;md2man/roff&#39;
67
63
 
68
64
  class YourManpageRenderer &lt; Redcarpet::Render::Base
69
65
  include Md2Man::Roff
@@ -71,24 +67,34 @@ class YourManpageRenderer &lt; Redcarpet::Render::Base
71
67
  end
72
68
 
73
69
  engine = Redcarpet::Markdown.new(YourManpageRenderer, your_options_hash)
74
- your_roff_output = engine.render(your_markdown_input)
75
- </code></pre><h3 id="For-HTML-output">For HTML output</h3><h4 id="At-the-command-line">At the command line</h4><pre><code>md2man-html --help
76
- </code></pre><h4 id="Inside-a-Ruby-script">Inside a Ruby script</h4><p>Use the default renderer:</p><pre><code>require 'md2man/html/engine'
70
+ your_roff_output = <a class="md2man-xref">engine.render(your_markdown_input)</a>
71
+ </code></pre>
72
+ <h3 id="For-HTML-output">For HTML output</h3><h4 id="At-the-command-line">At the command line</h4><p>See <a class="md2man-xref" href="../man1/md2man-html.1.html">md2man-html(1)</a> manual:</p>
73
+ <pre><code>md2man-html --help
74
+ </code></pre>
75
+ <h4 id="Inside-a-Ruby-script">Inside a Ruby script</h4><p>Use the default renderer:</p>
76
+ <pre><code>require &#39;md2man/html/engine&#39;
77
77
 
78
- your_html_output = Md2Man::HTML::ENGINE.render(your_markdown_input)
79
- </code></pre><p>Build your own renderer:</p><pre><code>require 'md2man/html/engine'
78
+ your_html_output = Md2Man::HTML::<a class="md2man-xref">ENGINE.render(your_markdown_input)</a>
79
+ </code></pre>
80
+ <p>Build your own renderer:</p>
81
+ <pre><code>require &#39;md2man/html/engine&#39;
80
82
 
81
83
  engine = Redcarpet::Markdown.new(Md2Man::HTML::Engine, your_options_hash)
82
- your_html_output = engine.render(your_markdown_input)
83
- </code></pre><p>Define your own renderer:</p><pre><code>require 'md2man/html/engine'
84
+ your_html_output = <a class="md2man-xref">engine.render(your_markdown_input)</a>
85
+ </code></pre>
86
+ <p>Define your own renderer:</p>
87
+ <pre><code>require &#39;md2man/html/engine&#39;
84
88
 
85
89
  class YourManpageRenderer &lt; Md2Man::HTML::Engine
86
90
  # ... your stuff here ...
87
91
  end
88
92
 
89
93
  engine = Redcarpet::Markdown.new(YourManpageRenderer, your_options_hash)
90
- your_html_output = engine.render(your_markdown_input)
91
- </code></pre><p>Mix-in your own renderer:</p><pre><code>require 'md2man/html'
94
+ your_html_output = <a class="md2man-xref">engine.render(your_markdown_input)</a>
95
+ </code></pre>
96
+ <p>Mix-in your own renderer:</p>
97
+ <pre><code>require &#39;md2man/html&#39;
92
98
 
93
99
  class YourManpageRenderer &lt; Redcarpet::Render::Base
94
100
  include Md2Man::HTML
@@ -96,16 +102,25 @@ class YourManpageRenderer &lt; Redcarpet::Render::Base
96
102
  end
97
103
 
98
104
  engine = Redcarpet::Markdown.new(YourManpageRenderer, your_options_hash)
99
- your_html_output = engine.render(your_markdown_input)
100
- </code></pre><h3 id="Building-man-pages">Building man pages</h3><h4 id="At-the-command-line">At the command line</h4><pre><code>md2man-rake --help
101
- </code></pre><h4 id="Inside-a-Ruby-script">Inside a Ruby script</h4><p>Add this snippet to your gemspec file:</p><pre><code>s.files += Dir['man/man?/*.?'] # UNIX man pages
102
- s.files += Dir['man/**/*.{html,css,js}'] # HTML man pages
103
- s.add_development_dependency 'md2man', '~&gt; 1.4'
104
- </code></pre><p>Add this line to your Rakefile:</p><pre><code>require 'md2man/rakefile'
105
- </code></pre><p>You now have a <code>rake md2man</code> task that builds manual pages from Markdown files
105
+ your_html_output = <a class="md2man-xref">engine.render(your_markdown_input)</a>
106
+ </code></pre>
107
+ <h3 id="Building-man-pages">Building man pages</h3><h4 id="At-the-command-line">At the command line</h4><p>See <a class="md2man-xref" href="../man1/md2man-rake.1.html">md2man-rake(1)</a> manual:</p>
108
+ <pre><code>md2man-rake --help
109
+ </code></pre>
110
+ <h4 id="Inside-a-Ruby-script">Inside a Ruby script</h4><p>Add this snippet to your gemspec file:</p>
111
+ <pre><code>s.files += Dir[&#39;man/man?/*.?&#39;] # UNIX man pages
112
+ s.files += Dir[&#39;man/**/*.{html,css,js}&#39;] # HTML man pages
113
+ s.add_development_dependency &#39;md2man&#39;, &#39;~&gt; 1.4&#39;
114
+ </code></pre>
115
+ <p>Add this line to your Rakefile:</p>
116
+ <pre><code>require &#39;md2man/rakefile&#39;
117
+ </code></pre>
118
+ <p>You now have a <code>rake md2man</code> task that builds manual pages from Markdown files
106
119
  (with &quot;.markdown&quot;, &quot;.mkd&quot;, or &quot;.md&quot; extension) inside <code>man/man*/</code> directories.
107
120
  There are also sub-tasks to build manual pages individually as <a href="http://troff.org">roff</a> or HTML.</p><p>If you&#39;re using Bundler, this task also hooks into Bundler&#39;s gem packaging
108
- tasks and ensures that your manual pages are built for packaging into a gem:</p><pre><code>bundle exec rake build
121
+ tasks and ensures that your manual pages are built for packaging into a gem:</p>
122
+ <pre><code>bundle exec rake build
109
123
  gem spec pkg/*.gem | fgrep man/
110
- </code></pre><h2 id="License">License</h2><p>Released under the ISC license. See the LICENSE file for details.</p></div></div></body>
124
+ </code></pre>
125
+ <h2 id="License">License</h2><p>Released under the ISC license. See the LICENSE file for details.</p></div></body>
111
126
  </html>
@@ -1,7 +1,7 @@
1
1
  # md2man - markdown to manpage
2
2
 
3
- md2man is a Ruby library and command-line program that converts [Markdown]
4
- documents into UNIX manual pages (both [roff] and HTML) using [Redcarpet].
3
+ md2man is a Ruby library and a set of command-line programs that convert
4
+ [Markdown] into UNIX manual pages (both [roff] and HTML) using [Redcarpet].
5
5
 
6
6
  ## Features
7
7
 
@@ -11,29 +11,22 @@ documents into UNIX manual pages (both [roff] and HTML) using [Redcarpet].
11
11
 
12
12
  * Supports markdown extensions such as [PHP Markdown Extra tables][tables].
13
13
 
14
- * Usable from the command line as a filter in a UNIX pipeline.
14
+ * Usable from the command line as a filter in a UNIX command pipeline.
15
15
 
16
16
  ### Demonstration
17
17
 
18
18
  Try converting [this example Markdown file][example] into a UNIX manual page:
19
19
 
20
- md2man EXAMPLE.markdown > EXAMPLE.1
20
+ md2man-roff EXAMPLE.markdown > EXAMPLE.1
21
21
  man -l EXAMPLE.1
22
22
 
23
23
  ![Obligatory screenshot of md2man(1) in action!](
24
24
  https://raw.github.com/sunaku/md2man/master/EXAMPLE.png)
25
25
 
26
- ### Limitations
26
+ Also try converting [that example Markdown file][example] into a web page:
27
27
 
28
- At present, md2man does not translate the following [Redcarpet] node types:
29
-
30
- * `block_html`
31
- * `strikethrough`
32
- * `superscript`
33
- * `image`
34
- * `raw_html`
35
-
36
- It issues a warning when it encounters these instead. Patches are welcome!
28
+ md2man-html EXAMPLE.markdown > EXAMPLE.html
29
+ open EXAMPLE.html
37
30
 
38
31
  ## Installation
39
32
 
@@ -44,56 +37,40 @@ It issues a warning when it encounters these instead. Patches are welcome!
44
37
  git clone git://github.com/sunaku/md2man
45
38
  cd md2man
46
39
  bundle install
47
- bundle exec md2man --help # run it directly
48
- bundle exec rake --tasks # packaging tasks
40
+ bundle exec rake --tasks # packaging tasks
41
+ bundle exec md2man-roff --help # run it directly
42
+ bundle exec md2man-html --help # run it directly
49
43
 
50
44
  ## Usage
51
45
 
52
- ### Document format
53
-
54
- md2man extends [Markdown] syntax in the following ways, as provisioned in the
55
- `Md2Man::Document` module and defined in its derivative `Md2Man::Roff` module:
56
-
57
- * Paragraphs whose lines are all uniformly indented by two spaces are
58
- considered to be "indented paragraphs". They are unindented accordingly
59
- before emission as `.IP` in the [roff] output.
60
-
61
- * Paragraphs whose subsequent lines (all except the first) are uniformly
62
- indented by two spaces are considered to be a "tagged paragraphs". They
63
- are unindented accordingly before emission as `.TP` in the [roff] output.
64
-
65
- md2man extends [Markdown] semantics in the following ways:
66
-
67
- * The first top-level heading (H1) found in the document is emitted as `.TH`
68
- in the roff(7) output to define the UNIX manual page's header and footer.
69
- Any subsequent top-level headings (H1) are treated as second-level (H2).
70
-
71
46
  ### For [roff] output
72
47
 
73
48
  #### At the command line
74
49
 
75
- md2man --help
50
+ See md2man-roff(1) manual:
51
+
52
+ md2man-roff --help
76
53
 
77
54
  #### Inside a Ruby script
78
55
 
79
56
  Use the default renderer:
80
57
 
81
- require 'md2man'
58
+ require 'md2man/roff/engine'
82
59
 
83
- your_roff_output = Md2Man::ENGINE.render(your_markdown_input)
60
+ your_roff_output = Md2Man::Roff::ENGINE.render(your_markdown_input)
84
61
 
85
62
  Build your own renderer:
86
63
 
87
- require 'md2man'
64
+ require 'md2man/roff/engine'
88
65
 
89
- engine = Redcarpet::Markdown.new(Md2Man::Engine, your_options_hash)
66
+ engine = Redcarpet::Markdown.new(Md2Man::Roff::Engine, your_options_hash)
90
67
  your_roff_output = engine.render(your_markdown_input)
91
68
 
92
69
  Define your own renderer:
93
70
 
94
- require 'md2man'
71
+ require 'md2man/roff/engine'
95
72
 
96
- class YourManpageRenderer < Md2Man::Engine
73
+ class YourManpageRenderer < Md2Man::Roff::Engine
97
74
  # ... your stuff here ...
98
75
  end
99
76
 
@@ -102,7 +79,7 @@ Define your own renderer:
102
79
 
103
80
  Mix-in your own renderer:
104
81
 
105
- require 'md2man'
82
+ require 'md2man/roff'
106
83
 
107
84
  class YourManpageRenderer < Redcarpet::Render::Base
108
85
  include Md2Man::Roff
@@ -116,6 +93,8 @@ Mix-in your own renderer:
116
93
 
117
94
  #### At the command line
118
95
 
96
+ See md2man-html(1) manual:
97
+
119
98
  md2man-html --help
120
99
 
121
100
  #### Inside a Ruby script
@@ -160,6 +139,8 @@ Mix-in your own renderer:
160
139
 
161
140
  #### At the command line
162
141
 
142
+ See md2man-rake(1) manual:
143
+
163
144
  md2man-rake --help
164
145
 
165
146
  #### Inside a Ruby script
@@ -2,15 +2,47 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 1.6.2 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 2.0.0 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"><div class="manpage"><h2 id="Version-1-6-2-2013-05-05">Version 1.6.2 (2013-05-05)</h2><p>Patch:</p>
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-0-2013-05-05">Version 2.0.0 (2013-05-05)</h2><p>This release renames md2man executables and libraries to highlight the fact
11
+ that md2man provides two processing pathways: one for Roff and one for HTML.</p><p>Major:</p>
12
+ <ul>
13
+ <li><p>Rename <a class="md2man-xref">md2man(1)</a> executable to <a class="md2man-xref" href="../man1/md2man-roff.1.html">md2man-roff(1)</a>.</p></li>
14
+ <li><p>Rename <code>Md2Man::Engine</code> to <code>Md2Man::Roff::Engine</code>.</p></li>
15
+ <li><p>Rename &quot;manpage-reference&quot; CSS class to &quot;md2man-xref&quot; in HTML output.</p></li>
16
+ <li><p>The <code>Md2Man::Document#reference()</code> method now takes only two parameters:</p>
17
+ <ul>
18
+ <li><code>input_match</code> - MatchData object for the reference in Markdown input
19
+ containing the following named capture groups:
20
+
21
+ <ul>
22
+ <li><code>:page</code> - name of the manual page</li>
23
+ <li><code>:section</code> - section number of the manual page</li>
24
+ </ul></li>
25
+ <li><code>output_match</code> - MatchData object for the reference in output document
26
+ containing the following named capture groups:
27
+
28
+ <ul>
29
+ <li><code>:addendum</code> - non-space characters immediately after the reference in
30
+ the output document</li>
31
+ </ul></li>
32
+ </ul></li>
33
+ </ul>
34
+ <p>Patch:</p>
35
+ <ul>
36
+ <li>Prevent cross-references from being expanded inside HTML tags.</li>
37
+ </ul>
38
+ <p>Other:</p>
39
+ <ul>
40
+ <li>Add <a class="md2man-xref" href="../man5/md2man.5.html">md2man(5)</a> manual page detailing md2man&#39;s markdown file format.</li>
41
+ </ul>
42
+ <h2 id="Version-1-6-2-2013-05-05">Version 1.6.2 (2013-05-05)</h2><p>Patch:</p>
11
43
  <ul>
12
44
  <li><p>Fix &quot;uninitialized constant Md2Man::VERSION&quot; error in <code>md2man/rakefile</code>.</p></li>
13
- <li><p>HTML manual page CSS: justify the lines of text just like <a class="manpage-reference">man(1)</a> does.</p></li>
45
+ <li><p>HTML manual page CSS: justify the lines of text just like <a class="md2man-xref">man(1)</a> does.</p></li>
14
46
  <li><p>HTML manual page CSS: resize body to allot 78ex width for manpage text.</p></li>
15
47
  </ul>
16
48
  <h2 id="Version-1-6-1-2013-05-04">Version 1.6.1 (2013-05-04)</h2><p>Patch:</p>
@@ -23,7 +55,7 @@
23
55
  </ul>
24
56
  <h2 id="Version-1-6-0-2013-03-10">Version 1.6.0 (2013-03-10)</h2><p>Minor:</p>
25
57
  <ul>
26
- <li><p>Added an <a class="manpage-reference" href="../man1/md2man-rake.1.html">md2man-rake(1)</a> executable that lets you run md2man&#39;s <a class="manpage-reference">rake(1)</a>
58
+ <li><p>Added an <a class="md2man-xref" href="../man1/md2man-rake.1.html">md2man-rake(1)</a> executable that lets you run md2man&#39;s <a class="md2man-xref">rake(1)</a>
27
59
  tasks <em>directly</em> from the command line: without the need for a &quot;Rakefile&quot;
28
60
  in your working directory that loads the <code>md2man/rakefile</code> library.</p></li>
29
61
  <li><p>In web pages generated by the <code>md2man:web</code> Rake task:</p>
@@ -86,14 +118,14 @@ The documentation has been corrected and the option remains disabled.</p></li>
86
118
  </ul>
87
119
  <p>Other:</p>
88
120
  <ul>
89
- <li><p>README: add <a class="manpage-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a> and Md2Man::HTML usage</p></li>
121
+ <li><p>README: add <a class="md2man-xref" href="../man1/md2man-html.1.html">md2man-html(1)</a> and Md2Man::HTML usage</p></li>
90
122
  <li><p>LICENSE: use GitHub profile URLs instead of e-mail</p></li>
91
123
  </ul>
92
124
  <h2 id="Version-1-4-0-2012-10-14">Version 1.4.0 (2012-10-14)</h2><p>Minor:</p>
93
125
  <ul>
94
126
  <li><p>roff: emit non-first H1 headings as H2 headings</p></li>
95
127
  <li><p>html: add <code>Md2Man::HTML::Engine</code> class for HTML manual page generation</p></li>
96
- <li><p>html: add <a class="manpage-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a> bin script for command line access to the above</p></li>
128
+ <li><p>html: add <a class="md2man-xref" href="../man1/md2man-html.1.html">md2man-html(1)</a> bin script for command line access to the above</p></li>
97
129
  <li><p>html: add ID attributes on all headings for easy permalinking</p></li>
98
130
  <li><p>rake: add <code>md2man/rakefile</code> to process markdown files in man/</p><p>This library provides a <code>rake md2man</code> task that builds UNIX and HTML
99
131
  manual pages from Markdown files (with &quot;.markdown&quot;, &quot;.mkd&quot;, or &quot;.md&quot;
@@ -114,7 +146,7 @@ your manual pages for packaging into a gem. See the README for details.</p></li
114
146
  <li><p>roff: also indent block_code just like block_quote.</p></li>
115
147
  <li><p>roff: add paragraph above block_quote for spacing.</p></li>
116
148
  <li><p>roff: render code blocks as paragraphs for spacing.</p><p>Otherwise there&#39;s not enough space between the previous paragraph and
117
- the code block: it appears on the next line and appears ugly in <a class="manpage-reference">man(1)</a>.</p></li>
149
+ the code block: it appears on the next line and appears ugly in <a class="md2man-xref">man(1)</a>.</p></li>
118
150
  <li><p>document: make reference regexp match more manpages.</p></li>
119
151
  </ul>
120
152
  <p>Other:</p>
@@ -189,7 +221,7 @@ bold styling. All that matters is that the subsequent lines are indented.</p></
189
221
  </ul>
190
222
  <p>Minor:</p>
191
223
  <ul>
192
- <li><p>Added <a class="manpage-reference" href="../man1/md2man.1.html">md2man(1)</a> executable for command-line usage.</p></li>
224
+ <li><p>Added <a class="md2man-xref">md2man(1)</a> executable for command-line usage.</p></li>
193
225
  <li><p>Added support for all HTML 4.0 and XHTML 1.0 entities.</p></li>
194
226
  <li><p>Added support for tables, horizontal rules, and more.</p></li>
195
227
  <li><p>Added <code>Md2Man::Roff</code> mixin for advanced Redcarpet2 usage.</p></li>
@@ -199,5 +231,5 @@ bold styling. All that matters is that the subsequent lines are indented.</p></
199
231
  <ul>
200
232
  <li>Rewrote entire Markdown to Roff conversion from scratch while doing TDD.</li>
201
233
  </ul>
202
- <h2 id="Version-0-0-1-2011-10-13">Version 0.0.1 (2011-10-13)</h2><p>First release! Happy birthday! Woohoo! :-)</p></div></div></body>
234
+ <h2 id="Version-0-0-1-2011-10-13">Version 0.0.1 (2011-10-13)</h2><p>First release! Happy birthday! Woohoo! :-)</p></div></body>
203
235
  </html>
@@ -1,3 +1,39 @@
1
+ ## Version 2.0.0 (2013-05-05)
2
+
3
+ This release renames md2man executables and libraries to highlight the fact
4
+ that md2man provides two processing pathways: one for Roff and one for HTML.
5
+
6
+ Major:
7
+
8
+ * Rename md2man(1) executable to md2man-roff(1).
9
+
10
+ * Rename `Md2Man::Engine` to `Md2Man::Roff::Engine`.
11
+
12
+ * Rename "manpage-reference" CSS class to "md2man-xref" in HTML output.
13
+
14
+ * The `Md2Man::Document#reference()` method now takes only two parameters:
15
+
16
+ * `input_match` - MatchData object for the reference in Markdown input
17
+ containing the following named capture groups:
18
+
19
+ * `:page` - name of the manual page
20
+
21
+ * `:section` - section number of the manual page
22
+
23
+ * `output_match` - MatchData object for the reference in output document
24
+ containing the following named capture groups:
25
+
26
+ * `:addendum` - non-space characters immediately after the reference in
27
+ the output document
28
+
29
+ Patch:
30
+
31
+ * Prevent cross-references from being expanded inside HTML tags.
32
+
33
+ Other:
34
+
35
+ * Add md2man(5) manual page detailing md2man's markdown file format.
36
+
1
37
  ## Version 1.6.2 (2013-05-05)
2
38
 
3
39
  Patch:
@@ -1,8 +1,8 @@
1
- .TH MD2MAN\-HTML 1 2013\-05\-05 1.6.2
1
+ .TH MD2MAN\-HTML 1 2013\-05\-05 2.0.0
2
2
  .SH NAME
3
3
  .PP
4
4
  md2man\-html \- convert
5
- .BR md2man (1)
5
+ .BR md2man (5)
6
6
  flavored
7
7
  .BR markdown (7)
8
8
  into HTML
@@ -11,28 +11,27 @@ into HTML
11
11
  \fB\fCmd2man-html\fR [\fIOPTION\fP]... [\fIFILE\fP]
12
12
  .SH DESCRIPTION
13
13
  .PP
14
- This program converts the
14
+ This program converts
15
+ .BR md2man (5)
16
+ flavored
15
17
  .BR markdown (7)
16
- input from the given \fIFILE\fP into HTML
17
- and then prints the result to stdout. stdin is read if \fIFILE\fP is not given.
18
- .SS Document format
19
- .PP
20
- See
21
- .BR md2man (1)
22
- for details about the document format and Markdown extensions.
23
- .SS Cross linking
18
+ input from the given
19
+ \fIFILE\fP into HTML and then prints the result to the standard output stream.
20
+ If \fIFILE\fP is not given, then the standard input stream is read in its place.
21
+ .SS Cross references
24
22
  .PP
25
- References to other manual pages are converted into hyperlinks that have
26
- class="manpage\-reference" and href="../man${section}/${page}.${section}.html"
23
+ Cross references to manual pages are emitted as HTML hyperlinks that have
24
+ \fB\fCclass="md2man-xref"\fR and \fB\fChref="../man$SECTION/$PAGE.$SECTION.html"\fR
27
25
  attributes.
28
26
  .PP
29
- For example, the
30
- .BR markdown (7)
31
- reference would be converted into HTML as:
27
+ For example, the \fB\fC
28
+ .BR printf (3)\fR
29
+ cross reference would be emitted as this HTML:
32
30
  .PP
33
31
  .RS
34
32
  .nf
35
- <a class="manpage-reference" href="../man7/markdown.7.html">markdown(7)</a>
33
+ <a class="md2man-xref" href="../man3/printf.3.html">
34
+ .BR printf (3)</a>
36
35
  .fi
37
36
  .RE
38
37
  .SH OPTIONS
@@ -41,4 +40,6 @@ reference would be converted into HTML as:
41
40
  Show this help manual.
42
41
  .SH SEE ALSO
43
42
  .PP
44
- .BR md2man (1)
43
+ .BR md2man-roff (1),
44
+ .BR md2man-rake (1),
45
+ .BR md2man (5)
@@ -2,14 +2,17 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 1.6.2 https://github.com/sunaku/md2man" />
6
- <title>md2man-html(1) &mdash; convert md2man(1) flavored markdown(7) into HTML</title>
5
+ <meta name="generator" content="md2man 2.0.0 https://github.com/sunaku/md2man" />
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"><div class="manpage"><h1 id="MD2MAN-HTML-1-2013-05-05-1-6-2">MD2MAN-HTML 1 2013-05-05 1.6.2</h1><h2 id="NAME">NAME</h2><p>md2man-html - convert <a class="manpage-reference" href="../man1/md2man.1.html">md2man(1)</a> flavored <a class="manpage-reference">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 the <a class="manpage-reference">markdown(7)</a> input from the given <em>FILE</em> into HTML
11
- and then prints the result to stdout. stdin is read if <em>FILE</em> is not given.</p><h3 id="Document-format">Document format</h3><p>See <a class="manpage-reference" href="../man1/md2man.1.html">md2man(1)</a> for details about the document format and Markdown extensions.</p><h3 id="Cross-linking">Cross linking</h3><p>References to other manual pages are converted into hyperlinks that have
12
- class=&quot;manpage-reference&quot; and href=&quot;../man${section}/${page}.${section}.html&quot;
13
- attributes.</p><p>For example, the <a class="manpage-reference">markdown(7)</a> reference would be converted into HTML as:</p><pre><code>&lt;a class=&quot;manpage-reference&quot; href=&quot;../man7/markdown.7.html&quot;&gt;markdown(7)&lt;/a&gt;
14
- </code></pre><h2 id="OPTIONS">OPTIONS</h2><dl><dt><code>-h</code>, <code>--help</code></dt><dd>Show this help manual.</dd></dl><h2 id="SEE-ALSO">SEE ALSO</h2><p><a class="manpage-reference" href="../man1/md2man.1.html">md2man(1)</a></p></div></div></body>
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-2013-05-05-2-0-0">MD2MAN-HTML 1 2013-05-05 2.0.0</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
+ <em>FILE</em> into HTML and then prints the result to the standard output stream.
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
+ <code>class=&quot;md2man-xref&quot;</code> and <code>href=&quot;../man$SECTION/$PAGE.$SECTION.html&quot;</code>
14
+ attributes.</p><p>For example, the <code><a class="md2man-xref">printf(3)</a></code> cross reference would be emitted as this HTML:</p>
15
+ <pre><code>&lt;a class=&quot;md2man-xref&quot; href=&quot;../man3/printf.3.html&quot;&gt;<a class="md2man-xref">printf(3)</a>&lt;/a&gt;
16
+ </code></pre>
17
+ <h2 id="OPTIONS">OPTIONS</h2><dl><dt><code>-h</code>, <code>--help</code></dt><dd>Show this help manual.</dd></dl><h2 id="SEE-ALSO">SEE ALSO</h2><p><a class="md2man-xref" href="../man1/md2man-roff.1.html">md2man-roff(1)</a>, <a class="md2man-xref" href="../man1/md2man-rake.1.html">md2man-rake(1)</a>, <a class="md2man-xref" href="../man5/md2man.5.html">md2man(5)</a></p></div></body>
15
18
  </html>
@@ -1,4 +1,4 @@
1
- .TH MD2MAN\-RAKE 1 2013\-05\-05 1.6.2
1
+ .TH MD2MAN\-RAKE 1 2013\-05\-05 2.0.0
2
2
  .SH NAME
3
3
  .PP
4
4
  md2man\-rake \- run
@@ -45,5 +45,6 @@ Run \fB\fCrake --help\fR to see more options.
45
45
  .SH SEE ALSO
46
46
  .PP
47
47
  .BR rake (1),
48
- .BR md2man (1),
49
- .BR markdown (7)
48
+ .BR md2man-roff (1),
49
+ .BR md2man-html (1),
50
+ .BR md2man (5)
@@ -2,14 +2,16 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="generator" content="md2man 1.6.2 https://github.com/sunaku/md2man" />
5
+ <meta name="generator" content="md2man 2.0.0 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"><div class="manpage"><h1 id="MD2MAN-RAKE-1-2013-05-05-1-6-2">MD2MAN-RAKE 1 2013-05-05 1.6.2</h1><h2 id="NAME">NAME</h2><p>md2man-rake - run <a class="manpage-reference">rake(1)</a> tasks from <a class="manpage-reference" href="../man1/md2man.1.html">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="manpage-reference">rake(1)</a> tasks provided by <a class="manpage-reference" href="../man1/md2man.1.html">md2man(1)</a> without having
11
- to create a special file named <code>Rakefile</code> that contains the following snippet:</p><pre><code>require 'md2man/rakefile'
12
- </code></pre><p>If no <em>TASK</em> is specified, then the <code>md2man</code> task is run by default.</p><h2 id="TASKS">TASKS</h2><dl><dt><code>md2man</code></dt><dd>Runs the <code>md2man:man</code> and <code>md2man:web</code> tasks, in that order.</dd></dl><dl><dt><code>md2man:man</code></dt><dd>Builds UNIX manual pages from <code>*.markdown</code>, <code>*.mkd</code>, and <code>*.md</code> files
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-2013-05-05-2-0-0">MD2MAN-RAKE 1 2013-05-05 2.0.0</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
+ to create a special file named <code>Rakefile</code> that contains the following snippet:</p>
12
+ <pre><code>require &#39;md2man/rakefile&#39;
13
+ </code></pre>
14
+ <p>If no <em>TASK</em> is specified, then the <code>md2man</code> task is run by default.</p><h2 id="TASKS">TASKS</h2><dl><dt><code>md2man</code></dt><dd>Runs the <code>md2man:man</code> and <code>md2man:web</code> tasks, in that order.</dd></dl><dl><dt><code>md2man:man</code></dt><dd>Builds UNIX manual pages from <code>*.markdown</code>, <code>*.mkd</code>, and <code>*.md</code> files
13
15
  found in or beneath the <code>man/</code> subdirectory in your working directory.</dd></dl><dl><dt><code>md2man:web</code></dt><dd>Builds HTML manual pages from <code>*.markdown</code>, <code>*.mkd</code>, and <code>*.md</code> files
14
- found in or beneath the <code>man/</code> subdirectory in your working directory.</dd></dl><h2 id="OPTIONS">OPTIONS</h2><dl><dt><code>-h</code>, <code>--help</code></dt><dd>Show this help manual.</dd></dl><p>Run <code>rake --help</code> to see more options.</p><h2 id="SEE-ALSO">SEE ALSO</h2><p><a class="manpage-reference">rake(1)</a>, <a class="manpage-reference" href="../man1/md2man.1.html">md2man(1)</a>, <a class="manpage-reference">markdown(7)</a></p></div></div></body>
16
+ found in or beneath the <code>man/</code> subdirectory in your working directory.</dd></dl><h2 id="OPTIONS">OPTIONS</h2><dl><dt><code>-h</code>, <code>--help</code></dt><dd>Show this help manual.</dd></dl><p>Run <code>rake --help</code> to see more options.</p><h2 id="SEE-ALSO">SEE ALSO</h2><p><a class="md2man-xref">rake(1)</a>, <a class="md2man-xref" href="../man1/md2man-roff.1.html">md2man-roff(1)</a>, <a class="md2man-xref" href="../man1/md2man-html.1.html">md2man-html(1)</a>, <a class="md2man-xref" href="../man5/md2man.5.html">md2man(5)</a></p></div></body>
15
17
  </html>