md2man 3.0.2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -0
- data/README.markdown +1 -1
- data/VERSION.markdown +16 -0
- data/bin/md2man-html +1 -1
- data/bin/md2man-rake +1 -1
- data/bin/md2man-roff +1 -1
- data/lib/md2man/document.rb +16 -3
- data/lib/md2man/html.rb +8 -0
- data/lib/md2man/roff.rb +2 -2
- data/lib/md2man/version.rb +1 -1
- data/man/index.html +1 -1
- data/man/man0/README.html +28 -46
- data/man/man0/README.markdown +1 -1
- data/man/man0/VERSION.html +17 -7
- data/man/man0/VERSION.markdown +16 -0
- data/man/man1/md2man-html.1 +3 -6
- data/man/man1/md2man-html.1.html +6 -10
- data/man/man1/md2man-rake.1 +1 -1
- data/man/man1/md2man-rake.1.html +3 -4
- data/man/man1/md2man-roff.1 +1 -1
- data/man/man1/md2man-roff.1.html +2 -2
- data/man/man5/md2man.5 +1 -1
- data/man/man5/md2man.5.html +6 -10
- data/man/man5/md2man.5.markdown +1 -1
- data/md2man.gemspec +1 -1
- data/test/md2man/html_test.rb +26 -7
- data/test/md2man/roff_test.rb +33 -15
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1026a3ecb6617c017afb7464fcec8c272cc5115
|
4
|
+
data.tar.gz: ee2bda46cd3fb7c38db2d4b737d38a722c72f3e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c1769063f893c8b7af6f57ea9c9a3d0c286e58233dbfa29dc98f6bbbb7443d7b4a85377ff1ba8f0e4485c59b2b5cb25010439e1f29bcbc46a1d75a94794b09d
|
7
|
+
data.tar.gz: d82c9bdf46d4a8344560ce3d589bacd26261d3a5ec96d36411120534b9a387661ff01d8125433cb1d73afefb4e3a8763f2df3dae9a5d8bfee9d67cbdfc1093ab
|
data/LICENSE
CHANGED
@@ -6,6 +6,7 @@ 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
8
|
Thanks to 2014 zimbatm <https://github.com/zimbatm>
|
9
|
+
Thanks to 2014 Mathias Panzenböck <https://github.com/panzi>
|
9
10
|
|
10
11
|
Permission to use, copy, modify, and/or distribute this software for any
|
11
12
|
purpose with or without fee is hereby granted, provided that the above
|
data/README.markdown
CHANGED
@@ -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', '~>
|
156
|
+
s.add_development_dependency 'md2man', '~> 4.0'
|
157
157
|
|
158
158
|
Add this line to your Rakefile:
|
159
159
|
|
data/VERSION.markdown
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## Version 4.0.0 (2014-10-26)
|
2
|
+
|
3
|
+
### Major:
|
4
|
+
|
5
|
+
* Cross references are no longer expanded inside code spans and code blocks.
|
6
|
+
|
7
|
+
Thanks to Mathias Panzenböck for reporting this issue in GH-19:
|
8
|
+
https://github.com/sunaku/md2man/issues/19
|
9
|
+
|
10
|
+
* The `Md2Man::Document` module now defines the following methods. If you
|
11
|
+
redefine/override these methods in deriving classes, make sure that you
|
12
|
+
call `super()` therein to trigger these methods' original implementation!
|
13
|
+
|
14
|
+
* `Md2Man::Document#block_code(code, language)`
|
15
|
+
* `Md2Man::Document#codespan(code)`
|
16
|
+
|
1
17
|
## Version 3.0.2 (2014-10-26)
|
2
18
|
|
3
19
|
### Patch:
|
data/bin/md2man-html
CHANGED
data/bin/md2man-rake
CHANGED
data/bin/md2man-roff
CHANGED
data/lib/md2man/document.rb
CHANGED
@@ -57,10 +57,18 @@ module Md2Man::Document
|
|
57
57
|
warn "md2man/document: normal_paragraph not implemented: #{text.inspect}"
|
58
58
|
end
|
59
59
|
|
60
|
+
def block_code code, language
|
61
|
+
decode_references code, true
|
62
|
+
end
|
63
|
+
|
60
64
|
#---------------------------------------------------------------------------
|
61
65
|
# span-level processing
|
62
66
|
#---------------------------------------------------------------------------
|
63
67
|
|
68
|
+
def codespan code
|
69
|
+
decode_references code, true
|
70
|
+
end
|
71
|
+
|
64
72
|
def reference input_match, output_match
|
65
73
|
warn "md2man/document: reference not implemented: #{input_match}"
|
66
74
|
end
|
@@ -82,12 +90,17 @@ private
|
|
82
90
|
end
|
83
91
|
end
|
84
92
|
|
85
|
-
def decode_references text
|
86
|
-
@references.delete_if do |key,
|
93
|
+
def decode_references text, restore_original=false
|
94
|
+
@references.delete_if do |key, input_match|
|
87
95
|
# the [^\S\n] captures all non-newline whitespace
|
88
96
|
# basically, it's meant to be \s but excluding \n
|
89
97
|
text.sub! /#{Regexp.escape key}(?<addendum>\S*[^\S\n]*)/ do
|
90
|
-
|
98
|
+
output_match = $~
|
99
|
+
if restore_original
|
100
|
+
input_match.to_s + output_match[:addendum]
|
101
|
+
else
|
102
|
+
reference input_match, output_match
|
103
|
+
end
|
91
104
|
end
|
92
105
|
end
|
93
106
|
text
|
data/lib/md2man/html.rb
CHANGED
@@ -62,10 +62,18 @@ module Md2Man::HTML
|
|
62
62
|
].join
|
63
63
|
end
|
64
64
|
|
65
|
+
def block_code code, language
|
66
|
+
"<pre><code>#{CGI.escape_html super}</code></pre>\n"
|
67
|
+
end
|
68
|
+
|
65
69
|
#---------------------------------------------------------------------------
|
66
70
|
# span-level processing
|
67
71
|
#---------------------------------------------------------------------------
|
68
72
|
|
73
|
+
def codespan code
|
74
|
+
"<code>#{CGI.escape_html super}</code>"
|
75
|
+
end
|
76
|
+
|
69
77
|
def reference input_match, output_match
|
70
78
|
if output_match.pre_match =~ /<[^>]*\z/
|
71
79
|
input_match.to_s
|
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 = escape(
|
45
|
+
code = escape(super, true)
|
46
46
|
block_quote "\n.nf\n#{code.chomp}\n.fi\n"
|
47
47
|
end
|
48
48
|
|
@@ -161,7 +161,7 @@ module Md2Man::Roff
|
|
161
161
|
end
|
162
162
|
|
163
163
|
def codespan code
|
164
|
-
code = escape(
|
164
|
+
code = escape(super, 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"
|
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
|
5
|
+
<meta name="generator" content="md2man 4.0.0 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
|
5
|
+
<meta name="generator" content="md2man 4.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]-->
|
@@ -22,51 +22,42 @@
|
|
22
22
|
<li><p>Supports markdown extensions such as <a href="http://michelf.com/projects/php-markdown/extra/#table">PHP Markdown Extra tables</a>.</p></li>
|
23
23
|
<li><p>Usable from the command line as a filter in a UNIX command pipeline.</p></li>
|
24
24
|
</ul>
|
25
|
-
<h3 id="demonstration"><a name="demonstration" href="#demonstration" class="md2man-permalink" title="permalink"></a>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>
|
26
|
-
<pre><code>md2man-roff EXAMPLE.markdown > EXAMPLE.1
|
25
|
+
<h3 id="demonstration"><a name="demonstration" href="#demonstration" class="md2man-permalink" title="permalink"></a>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-roff EXAMPLE.markdown > EXAMPLE.1
|
27
26
|
man -l EXAMPLE.1
|
28
27
|
</code></pre>
|
29
|
-
<p><img src="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>
|
30
|
-
<pre><code>md2man-html EXAMPLE.markdown > EXAMPLE.html
|
28
|
+
<p><img src="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><pre><code>md2man-html EXAMPLE.markdown > EXAMPLE.html
|
31
29
|
open EXAMPLE.html
|
32
30
|
</code></pre>
|
33
|
-
<h2 id="installation"><a name="installation" href="#installation" class="md2man-permalink" title="permalink"></a>Installation</h2>
|
34
|
-
<pre><code>gem install md2man
|
31
|
+
<h2 id="installation"><a name="installation" href="#installation" class="md2man-permalink" title="permalink"></a>Installation</h2><pre><code>gem install md2man
|
35
32
|
</code></pre>
|
36
|
-
<h3 id="development"><a name="development" href="#development" class="md2man-permalink" title="permalink"></a>Development</h3>
|
37
|
-
<pre><code>git clone git://github.com/sunaku/md2man
|
33
|
+
<h3 id="development"><a name="development" href="#development" class="md2man-permalink" title="permalink"></a>Development</h3><pre><code>git clone git://github.com/sunaku/md2man
|
38
34
|
cd md2man
|
39
35
|
bundle install
|
40
36
|
bundle exec rake --tasks # packaging tasks
|
41
37
|
bundle exec md2man-roff --help # run it directly
|
42
38
|
bundle exec md2man-html --help # run it directly
|
43
39
|
</code></pre>
|
44
|
-
<h2 id="usage"><a name="usage" href="#usage" class="md2man-permalink" title="permalink"></a>Usage</h2><h3 id="for-roff-output"><a name="for-roff-output" href="#for-roff-output" class="md2man-permalink" title="permalink"></a>For <a href="http://troff.org">roff</a> output</h3><h4 id="at-the-command-line"><a name="at-the-command-line" href="#at-the-command-line" class="md2man-permalink" title="permalink"></a>At the command line</h4><p>See <a class="md2man-reference" href="../man1/md2man-roff.1.html">md2man-roff(1)</a> manual:</p>
|
45
|
-
<pre><code>md2man-roff --help
|
40
|
+
<h2 id="usage"><a name="usage" href="#usage" class="md2man-permalink" title="permalink"></a>Usage</h2><h3 id="for-roff-output"><a name="for-roff-output" href="#for-roff-output" class="md2man-permalink" title="permalink"></a>For <a href="http://troff.org">roff</a> output</h3><h4 id="at-the-command-line"><a name="at-the-command-line" href="#at-the-command-line" class="md2man-permalink" title="permalink"></a>At the command line</h4><p>See <a class="md2man-reference" href="../man1/md2man-roff.1.html">md2man-roff(1)</a> manual:</p><pre><code>md2man-roff --help
|
46
41
|
</code></pre>
|
47
|
-
<h4 id="inside-a-ruby-script"><a name="inside-a-ruby-script" href="#inside-a-ruby-script" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h4><p>Use the default renderer:</p>
|
48
|
-
<pre><code>require 'md2man/roff/engine'
|
42
|
+
<h4 id="inside-a-ruby-script"><a name="inside-a-ruby-script" href="#inside-a-ruby-script" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h4><p>Use the default renderer:</p><pre><code>require 'md2man/roff/engine'
|
49
43
|
|
50
|
-
your_roff_output = Md2Man::Roff
|
44
|
+
your_roff_output = Md2Man::Roff::ENGINE.render(your_markdown_input)
|
51
45
|
</code></pre>
|
52
|
-
<p>Build your own renderer:</p>
|
53
|
-
<pre><code>require 'md2man/roff/engine'
|
46
|
+
<p>Build your own renderer:</p><pre><code>require 'md2man/roff/engine'
|
54
47
|
|
55
48
|
engine = Redcarpet::Markdown.new(Md2Man::Roff::Engine, your_options_hash)
|
56
|
-
your_roff_output =
|
49
|
+
your_roff_output = engine.render(your_markdown_input)
|
57
50
|
</code></pre>
|
58
|
-
<p>Define your own renderer:</p>
|
59
|
-
<pre><code>require 'md2man/roff/engine'
|
51
|
+
<p>Define your own renderer:</p><pre><code>require 'md2man/roff/engine'
|
60
52
|
|
61
53
|
class YourManpageRenderer < Md2Man::Roff::Engine
|
62
54
|
# ... your stuff here ...
|
63
55
|
end
|
64
56
|
|
65
57
|
engine = Redcarpet::Markdown.new(YourManpageRenderer, your_options_hash)
|
66
|
-
your_roff_output =
|
58
|
+
your_roff_output = engine.render(your_markdown_input)
|
67
59
|
</code></pre>
|
68
|
-
<p>Mix-in your own renderer:</p>
|
69
|
-
<pre><code>require 'md2man/roff'
|
60
|
+
<p>Mix-in your own renderer:</p><pre><code>require 'md2man/roff'
|
70
61
|
|
71
62
|
class YourManpageRenderer < Redcarpet::Render::Base
|
72
63
|
include Md2Man::Roff
|
@@ -74,34 +65,29 @@ class YourManpageRenderer < Redcarpet::Render::Base
|
|
74
65
|
end
|
75
66
|
|
76
67
|
engine = Redcarpet::Markdown.new(YourManpageRenderer, your_options_hash)
|
77
|
-
your_roff_output =
|
68
|
+
your_roff_output = engine.render(your_markdown_input)
|
78
69
|
</code></pre>
|
79
|
-
<h3 id="for-html-output"><a name="for-html-output" href="#for-html-output" class="md2man-permalink" title="permalink"></a>For HTML output</h3><h4 id="at-the-command-line-1"><a name="at-the-command-line-1" href="#at-the-command-line-1" class="md2man-permalink" title="permalink"></a>At the command line</h4><p>See <a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a> manual:</p>
|
80
|
-
<pre><code>md2man-html --help
|
70
|
+
<h3 id="for-html-output"><a name="for-html-output" href="#for-html-output" class="md2man-permalink" title="permalink"></a>For HTML output</h3><h4 id="at-the-command-line-1"><a name="at-the-command-line-1" href="#at-the-command-line-1" class="md2man-permalink" title="permalink"></a>At the command line</h4><p>See <a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a> manual:</p><pre><code>md2man-html --help
|
81
71
|
</code></pre>
|
82
|
-
<h4 id="inside-a-ruby-script-1"><a name="inside-a-ruby-script-1" href="#inside-a-ruby-script-1" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h4><p>Use the default renderer:</p>
|
83
|
-
<pre><code>require 'md2man/html/engine'
|
72
|
+
<h4 id="inside-a-ruby-script-1"><a name="inside-a-ruby-script-1" href="#inside-a-ruby-script-1" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h4><p>Use the default renderer:</p><pre><code>require 'md2man/html/engine'
|
84
73
|
|
85
|
-
your_html_output = Md2Man::HTML
|
74
|
+
your_html_output = Md2Man::HTML::ENGINE.render(your_markdown_input)
|
86
75
|
</code></pre>
|
87
|
-
<p>Build your own renderer:</p>
|
88
|
-
<pre><code>require 'md2man/html/engine'
|
76
|
+
<p>Build your own renderer:</p><pre><code>require 'md2man/html/engine'
|
89
77
|
|
90
78
|
engine = Redcarpet::Markdown.new(Md2Man::HTML::Engine, your_options_hash)
|
91
|
-
your_html_output =
|
79
|
+
your_html_output = engine.render(your_markdown_input)
|
92
80
|
</code></pre>
|
93
|
-
<p>Define your own renderer:</p>
|
94
|
-
<pre><code>require 'md2man/html/engine'
|
81
|
+
<p>Define your own renderer:</p><pre><code>require 'md2man/html/engine'
|
95
82
|
|
96
83
|
class YourManpageRenderer < Md2Man::HTML::Engine
|
97
84
|
# ... your stuff here ...
|
98
85
|
end
|
99
86
|
|
100
87
|
engine = Redcarpet::Markdown.new(YourManpageRenderer, your_options_hash)
|
101
|
-
your_html_output =
|
88
|
+
your_html_output = engine.render(your_markdown_input)
|
102
89
|
</code></pre>
|
103
|
-
<p>Mix-in your own renderer:</p>
|
104
|
-
<pre><code>require 'md2man/html'
|
90
|
+
<p>Mix-in your own renderer:</p><pre><code>require 'md2man/html'
|
105
91
|
|
106
92
|
class YourManpageRenderer < Redcarpet::Render::Base
|
107
93
|
include Md2Man::HTML
|
@@ -109,24 +95,20 @@ class YourManpageRenderer < Redcarpet::Render::Base
|
|
109
95
|
end
|
110
96
|
|
111
97
|
engine = Redcarpet::Markdown.new(YourManpageRenderer, your_options_hash)
|
112
|
-
your_html_output =
|
98
|
+
your_html_output = engine.render(your_markdown_input)
|
113
99
|
</code></pre>
|
114
|
-
<h3 id="building-man-pages"><a name="building-man-pages" href="#building-man-pages" class="md2man-permalink" title="permalink"></a>Building man pages</h3><h4 id="at-the-command-line-2"><a name="at-the-command-line-2" href="#at-the-command-line-2" class="md2man-permalink" title="permalink"></a>At the command line</h4><p>See <a class="md2man-reference" href="../man1/md2man-rake.1.html">md2man-rake(1)</a> manual:</p>
|
115
|
-
<pre><code>md2man-rake --help
|
100
|
+
<h3 id="building-man-pages"><a name="building-man-pages" href="#building-man-pages" class="md2man-permalink" title="permalink"></a>Building man pages</h3><h4 id="at-the-command-line-2"><a name="at-the-command-line-2" href="#at-the-command-line-2" class="md2man-permalink" title="permalink"></a>At the command line</h4><p>See <a class="md2man-reference" href="../man1/md2man-rake.1.html">md2man-rake(1)</a> manual:</p><pre><code>md2man-rake --help
|
116
101
|
</code></pre>
|
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
|
-
<pre><code>s.files += Dir['man/man?/*.?'] # UNIX man pages
|
102
|
+
<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><pre><code>s.files += Dir['man/man?/*.?'] # UNIX man pages
|
119
103
|
s.files += Dir['man/**/*.{html,css,js}'] # HTML man pages
|
120
|
-
s.add_development_dependency 'md2man', '~>
|
104
|
+
s.add_development_dependency 'md2man', '~> 4.0'
|
121
105
|
</code></pre>
|
122
|
-
<p>Add this line to your Rakefile:</p>
|
123
|
-
<pre><code>require 'md2man/rakefile'
|
106
|
+
<p>Add this line to your Rakefile:</p><pre><code>require 'md2man/rakefile'
|
124
107
|
</code></pre>
|
125
108
|
<p>You now have a <code>rake md2man</code> task that builds manual pages from Markdown files
|
126
109
|
(with ".markdown", ".mkd", or ".md" extension) inside <code>man/man*/</code> directories.
|
127
110
|
There are also sub-tasks to build manual pages individually as <a href="http://troff.org">roff</a> or HTML.</p><p>If you're using Bundler, this task also hooks into Bundler's gem packaging
|
128
|
-
tasks and ensures that your manual pages are built for packaging into a gem:</p>
|
129
|
-
<pre><code>bundle exec rake build
|
111
|
+
tasks and ensures that your manual pages are built for packaging into a gem:</p><pre><code>bundle exec rake build
|
130
112
|
gem spec pkg/*.gem | fgrep man/
|
131
113
|
</code></pre>
|
132
114
|
<h2 id="license"><a name="license" href="#license" class="md2man-permalink" title="permalink"></a>License</h2><p>Released under the ISC license. See the LICENSE file for details.</p></div></body>
|
data/man/man0/README.markdown
CHANGED
@@ -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', '~>
|
156
|
+
s.add_development_dependency 'md2man', '~> 4.0'
|
157
157
|
|
158
158
|
Add this line to your Rakefile:
|
159
159
|
|
data/man/man0/VERSION.html
CHANGED
@@ -2,20 +2,31 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man
|
5
|
+
<meta name="generator" content="md2man 4.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"><h2 id="version-
|
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-4-0-0-2014-10-26"><a name="version-4-0-0-2014-10-26" href="#version-4-0-0-2014-10-26" class="md2man-permalink" title="permalink"></a>Version 4.0.0 (2014-10-26)</h2><h3 id="major"><a name="major" href="#major" class="md2man-permalink" title="permalink"></a>Major:</h3>
|
11
|
+
<ul>
|
12
|
+
<li><p>Cross references are no longer expanded inside code spans and code blocks.</p><p>Thanks to Mathias Panzenböck for reporting this issue in GH-19:
|
13
|
+
<a href="https://github.com/sunaku/md2man/issues/19">https://github.com/sunaku/md2man/issues/19</a></p></li>
|
14
|
+
<li><p>The <code>Md2Man::Document</code> module now defines the following methods. If you
|
15
|
+
redefine/override these methods in deriving classes, make sure that you
|
16
|
+
call <code>super()</code> therein to trigger these methods' original implementation!</p>
|
17
|
+
<ul>
|
18
|
+
<li><code>Md2Man::Document#block_code(code, language)</code></li>
|
19
|
+
<li><code>Md2Man::Document#codespan(code)</code></li>
|
20
|
+
</ul></li>
|
21
|
+
</ul>
|
22
|
+
<h2 id="version-3-0-2-2014-10-26"><a name="version-3-0-2-2014-10-26" href="#version-3-0-2-2014-10-26" class="md2man-permalink" title="permalink"></a>Version 3.0.2 (2014-10-26)</h2><h3 id="patch"><a name="patch" href="#patch" class="md2man-permalink" title="permalink"></a>Patch:</h3>
|
11
23
|
<ul>
|
12
24
|
<li>Update bootstrap 2.3.2 CDN URL; previous one died.</li>
|
13
25
|
</ul>
|
14
26
|
<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-1"><a name="patch-1" href="#patch-1" class="md2man-permalink" title="permalink"></a>Patch:</h3>
|
15
27
|
<ul>
|
16
28
|
<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
|
17
|
-
macro package that defines styles for email addresses and general URLs.</p
|
18
|
-
<pre><code>$ groff --version
|
29
|
+
macro package that defines styles for email addresses and general URLs.</p><pre><code>$ groff --version
|
19
30
|
...
|
20
31
|
GNU grops (groff) version 1.19.2
|
21
32
|
GNU troff (groff) version 1.19.2
|
@@ -27,7 +38,7 @@ GNU troff (groff) version 1.19.2
|
|
27
38
|
<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:
|
28
39
|
unique, lowercase, and squeezed and stripped of HTML tags and non-word chars.
|
29
40
|
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
|
30
|
-
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>
|
41
|
+
have for jumping to specific locations in your HTML manuals after upgrading.</p><h3 id="major-1"><a name="major-1" href="#major-1" class="md2man-permalink" title="permalink"></a>Major:</h3>
|
31
42
|
<ul>
|
32
43
|
<li><p>Make permalink anchors on headings fully lowercase in <a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a>.</p></li>
|
33
44
|
<li><p>Put permalinks on left & indicate target permalink in <a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a>.</p></li>
|
@@ -51,8 +62,7 @@ See <a href="https://github.com/sunaku/readably/pull/3">https://github.com/sunak
|
|
51
62
|
makes it easy for readers to bookmark and share direct links to specific
|
52
63
|
sections of your HTML manual pages.</p></li>
|
53
64
|
<li><p><a class="md2man-reference" href="../man1/md2man-html.1.html">md2man-html(1)</a> now wraps individual components of the special <code>.TH</code>
|
54
|
-
top-level heading in HTML <code><span></code> elements with stylable CSS classes:</p
|
55
|
-
<pre><code><span class="md2man-title">...</span>
|
65
|
+
top-level heading in HTML <code><span></code> elements with stylable CSS classes:</p><pre><code><span class="md2man-title">...</span>
|
56
66
|
<span class="md2man-section">...</span>
|
57
67
|
<span class="md2man-date">...</span>
|
58
68
|
<span class="md2man-source">...</span>
|
data/man/man0/VERSION.markdown
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## Version 4.0.0 (2014-10-26)
|
2
|
+
|
3
|
+
### Major:
|
4
|
+
|
5
|
+
* Cross references are no longer expanded inside code spans and code blocks.
|
6
|
+
|
7
|
+
Thanks to Mathias Panzenböck for reporting this issue in GH-19:
|
8
|
+
https://github.com/sunaku/md2man/issues/19
|
9
|
+
|
10
|
+
* The `Md2Man::Document` module now defines the following methods. If you
|
11
|
+
redefine/override these methods in deriving classes, make sure that you
|
12
|
+
call `super()` therein to trigger these methods' original implementation!
|
13
|
+
|
14
|
+
* `Md2Man::Document#block_code(code, language)`
|
15
|
+
* `Md2Man::Document#codespan(code)`
|
16
|
+
|
1
17
|
## Version 3.0.2 (2014-10-26)
|
2
18
|
|
3
19
|
### Patch:
|
data/man/man1/md2man-html.1
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH MD2MAN\-HTML 1 2014\-10\-26
|
1
|
+
.TH MD2MAN\-HTML 1 2014\-10\-26 4.0.0
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
4
|
md2man\-html \- convert
|
@@ -69,14 +69,11 @@ Cross references to manual pages are emitted as HTML hyperlinks that have
|
|
69
69
|
\fB\fCclass="md2man\-reference"\fR and \fB\fChref="../man$SECTION/$PAGE.$SECTION.html"\fR
|
70
70
|
attributes.
|
71
71
|
.PP
|
72
|
-
For example, the \fB\
|
73
|
-
.BR printf (3)\fR
|
74
|
-
cross reference would be emitted as this HTML:
|
72
|
+
For example, the \fB\fCprintf(3)\fR cross reference would be emitted as this HTML:
|
75
73
|
.PP
|
76
74
|
.RS
|
77
75
|
.nf
|
78
|
-
<a class="md2man\-reference" href="../man3/printf.3.html">
|
79
|
-
.BR printf (3)</a>
|
76
|
+
<a class="md2man\-reference" href="../man3/printf.3.html">printf(3)</a>
|
80
77
|
.fi
|
81
78
|
.RE
|
82
79
|
.SH OPTIONS
|
data/man/man1/md2man-html.1.html
CHANGED
@@ -2,16 +2,15 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man
|
5
|
+
<meta name="generator" content="md2man 4.0.0 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-26-
|
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-26-4-0-0"><a name="md2man-html-1-2014-10-26-4-0-0" href="#md2man-html-1-2014-10-26-4-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-10-26</span> <span class="md2man-source">4.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
|
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 "Top-level
|
13
|
-
headings" in <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a>, is wrapped in stylable <code><span></code> elements as follows:</p
|
14
|
-
<pre><code><span class="md2man-title">...</span>
|
13
|
+
headings" in <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a>, is wrapped in stylable <code><span></code> elements as follows:</p><pre><code><span class="md2man-title">...</span>
|
15
14
|
<span class="md2man-section">...</span>
|
16
15
|
<span class="md2man-date">...</span>
|
17
16
|
<span class="md2man-source">...</span>
|
@@ -19,12 +18,10 @@ headings" in <a class="md2man-reference" href="../man5/md2man.5.html">md2ma
|
|
19
18
|
</code></pre>
|
20
19
|
<h3 id="heading-permalinks"><a name="heading-permalinks" href="#heading-permalinks" class="md2man-permalink" title="permalink"></a>Heading permalinks</h3><p>Self-referencing hyperlinks (for permanent linking) are added to headings by
|
21
20
|
converting their labels into URI fragments that are unique (using a counter),
|
22
|
-
lowercase, and squeezed and stripped of HTML tags and non-word characters.</p><p>For example, a heading labeled <code>Ver<s>iON 3(2</s>!4)))</code> would be emitted as:</p
|
23
|
-
<pre><code><h2 id="ver-ion-3-2-4"><a name="ver-ion-3-2-4" href="#ver-ion-3-2-4"
|
21
|
+
lowercase, and squeezed and stripped of HTML tags and non-word characters.</p><p>For example, a heading labeled <code>Ver<s>iON 3(2</s>!4)))</code> would be emitted as:</p><pre><code><h2 id="ver-ion-3-2-4"><a name="ver-ion-3-2-4" href="#ver-ion-3-2-4"
|
24
22
|
class="md2man-permalink" title="permalink"></a>Ver<s>iON 3(2</s>!4)))</h2>
|
25
23
|
</code></pre>
|
26
|
-
<p>For example, multiple headings labeled <code>Hello, world!</code> would be emitted as:</p
|
27
|
-
<pre><code><h2 id="hello-world"><a name="hello-world" href="#hello-world"
|
24
|
+
<p>For example, multiple headings labeled <code>Hello, world!</code> would be emitted as:</p><pre><code><h2 id="hello-world"><a name="hello-world" href="#hello-world"
|
28
25
|
class="md2man-permalink" title="permalink"></a>Hello, world!</h2>
|
29
26
|
|
30
27
|
<h2 id="hello-world-1"><a name="hello-world-1" href="#hello-world-1"
|
@@ -35,8 +32,7 @@ class="md2man-permalink" title="permalink"></a>Hell
|
|
35
32
|
</code></pre>
|
36
33
|
<h3 id="cross-references"><a name="cross-references" href="#cross-references" class="md2man-permalink" title="permalink"></a>Cross references</h3><p>Cross references to manual pages are emitted as HTML hyperlinks that have
|
37
34
|
<code>class="md2man-reference"</code> and <code>href="../man$SECTION/$PAGE.$SECTION.html"</code>
|
38
|
-
attributes.</p><p>For example, the <code
|
39
|
-
<pre><code><a class="md2man-reference" href="../man3/printf.3.html"><a class="md2man-reference">printf(3)</a></a>
|
35
|
+
attributes.</p><p>For example, the <code>printf(3)</code> cross reference would be emitted as this HTML:</p><pre><code><a class="md2man-reference" href="../man3/printf.3.html">printf(3)</a>
|
40
36
|
</code></pre>
|
41
37
|
<h2 id="options"><a name="options" href="#options" class="md2man-permalink" title="permalink"></a>OPTIONS</h2><dl><dt><code>-h</code>, <code>--help</code></dt><dd>Show this help manual.</dd></dl><h2 id="see-also"><a name="see-also" href="#see-also" class="md2man-permalink" title="permalink"></a>SEE ALSO</h2><p><a class="md2man-reference" href="../man1/md2man-roff.1.html">md2man-roff(1)</a>, <a class="md2man-reference" href="../man1/md2man-rake.1.html">md2man-rake(1)</a>, <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a></p></div></body>
|
42
38
|
</html>
|
data/man/man1/md2man-rake.1
CHANGED
data/man/man1/md2man-rake.1.html
CHANGED
@@ -2,14 +2,13 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man
|
5
|
+
<meta name="generator" content="md2man 4.0.0 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-26-
|
11
|
-
to create a special file named <code>Rakefile</code> that contains the following snippet:</p>
|
12
|
-
<pre><code>require 'md2man/rakefile'
|
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-26-4-0-0"><a name="md2man-rake-1-2014-10-26-4-0-0" href="#md2man-rake-1-2014-10-26-4-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-10-26</span> <span class="md2man-source">4.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
|
11
|
+
to create a special file named <code>Rakefile</code> that contains the following snippet:</p><pre><code>require 'md2man/rakefile'
|
13
12
|
</code></pre>
|
14
13
|
<p>If no <em>TASK</em> is specified, then the <code>md2man</code> task is run by default.</p><h2 id="tasks"><a name="tasks" href="#tasks" class="md2man-permalink" title="permalink"></a>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
|
15
14
|
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
|
data/man/man1/md2man-roff.1
CHANGED
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
|
5
|
+
<meta name="generator" content="md2man 4.0.0 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-26-
|
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-26-4-0-0"><a name="md2man-roff-1-2014-10-26-4-0-0" href="#md2man-roff-1-2014-10-26-4-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-10-26</span> <span class="md2man-source">4.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
|
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
data/man/man5/md2man.5.html
CHANGED
@@ -2,14 +2,13 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man
|
5
|
+
<meta name="generator" content="md2man 4.0.0 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-26-
|
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
|
-
<pre><code>This is a
|
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-26-4-0-0"><a name="md2man-5-2014-10-26-4-0-0" href="#md2man-5-2014-10-26-4-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-10-26</span> <span class="md2man-source">4.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
|
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><pre><code>This is a
|
13
12
|
normal
|
14
13
|
paragraph.
|
15
14
|
|
@@ -27,8 +26,7 @@ This
|
|
27
26
|
paragraph.
|
28
27
|
</code></pre>
|
29
28
|
<h4 id="normal-paragraphs"><a name="normal-paragraphs" href="#normal-paragraphs" class="md2man-permalink" title="permalink"></a>Normal paragraphs</h4><p>Paragraphs whose lines are all indented by exactly zero or one additional
|
30
|
-
spaces are considered to be "normal paragraphs". For example:</p>
|
31
|
-
<pre><code>This is a
|
29
|
+
spaces are considered to be "normal paragraphs". For example:</p><pre><code>This is a
|
32
30
|
normal
|
33
31
|
paragraph.
|
34
32
|
|
@@ -39,14 +37,12 @@ This
|
|
39
37
|
</code></pre>
|
40
38
|
<h4 id="tagged-paragraphs"><a name="tagged-paragraphs" href="#tagged-paragraphs" class="md2man-permalink" title="permalink"></a>Tagged paragraphs</h4><p>Paragraphs whose first line is indented by less than two additional spaces and
|
41
39
|
whose subsequent lines are uniformly indented by exactly two additional spaces
|
42
|
-
are considered to be "tagged paragraphs". For example:</p>
|
43
|
-
<pre><code>This is a
|
40
|
+
are considered to be "tagged paragraphs". For example:</p><pre><code>This is a
|
44
41
|
tagged
|
45
42
|
paragraph.
|
46
43
|
</code></pre>
|
47
44
|
<h4 id="indented-paragraphs"><a name="indented-paragraphs" href="#indented-paragraphs" class="md2man-permalink" title="permalink"></a>Indented paragraphs</h4><p>Paragraphs whose lines are all uniformly indented by exactly two additional
|
48
|
-
spaces are considered to be "indented paragraphs". For example:</p>
|
49
|
-
<pre><code> This is an
|
45
|
+
spaces are considered to be "indented paragraphs". For example:</p><pre><code> This is an
|
50
46
|
indented
|
51
47
|
paragraph.
|
52
48
|
</code></pre>
|
data/man/man5/md2man.5.markdown
CHANGED
data/md2man.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.files += Dir['man/**/*.{html,css,js}'] # HTML man pages
|
22
22
|
|
23
23
|
s.required_ruby_version = '>= 1.9.1'
|
24
|
-
s.add_runtime_dependency 'binman', '~>
|
24
|
+
s.add_runtime_dependency 'binman', '~> 4.0'
|
25
25
|
s.add_runtime_dependency 'redcarpet', '~> 3.0'
|
26
26
|
s.add_development_dependency 'minitest', '~> 5.0'
|
27
27
|
s.add_development_dependency 'rake', '~> 10.1'
|
data/test/md2man/html_test.rb
CHANGED
@@ -57,8 +57,7 @@ describe 'html engine' do
|
|
57
57
|
|
|
58
58
|
| <a class="md2man-reference" href="../man3/printf.3.html">printf(3)</a>
|
59
59
|
INPUT
|
60
|
-
|<p>For example, the <code
|
61
|
-
|<pre><code><a class="md2man-reference" href="../man3/printf.3.html"><a class="md2man-reference" href="../man3/printf.3.html">printf(3)</a></a>
|
60
|
+
|<p>For example, the <code>printf(3)</code> cross reference would be emitted as this HTML:</p><pre><code><a class="md2man-reference" href="../man3/printf.3.html">printf(3)</a>
|
62
61
|
|</code></pre>
|
63
62
|
|
|
64
63
|
OUTPUT
|
@@ -80,25 +79,25 @@ describe 'html engine' do
|
|
80
79
|
OUTPUT
|
81
80
|
end
|
82
81
|
|
83
|
-
it '
|
82
|
+
it 'does not render references inside code blocks' do
|
84
83
|
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
85
84
|
| this is a code block
|
86
85
|
| containing markdown(7),
|
87
86
|
| roff(7), and much more!
|
88
87
|
INPUT
|
89
88
|
|<pre><code>this is a code block
|
90
|
-
|containing
|
91
|
-
|
89
|
+
|containing markdown(7),
|
90
|
+
|roff(7), and much more!
|
92
91
|
|</code></pre>
|
93
92
|
|
|
94
93
|
OUTPUT
|
95
94
|
end
|
96
95
|
|
97
|
-
it '
|
96
|
+
it 'does not render references inside code spans' do
|
98
97
|
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
99
98
|
|this is a code span `containing markdown(7), roff(7), and` much more!
|
100
99
|
INPUT
|
101
|
-
|<p>this is a code span <code>containing
|
100
|
+
|<p>this is a code span <code>containing markdown(7), roff(7), and</code> much more!</p>
|
102
101
|
OUTPUT
|
103
102
|
end
|
104
103
|
|
@@ -170,4 +169,24 @@ describe 'html engine' do
|
|
170
169
|
<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
170
|
OUTPUT
|
172
171
|
end
|
172
|
+
|
173
|
+
it 'https://github.com/sunaku/md2man/issues/19' do
|
174
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
175
|
+
|### Macros
|
176
|
+
|
|
177
|
+
| #define PIPES_GET_LAST(CHAIN)
|
178
|
+
| #define PIPES_GET_IN(CHAIN)
|
179
|
+
| #define PIPES_GET_OUT(CHAIN)
|
180
|
+
| #define PIPES_GET_ERR(CHAIN)
|
181
|
+
|
|
182
|
+
|### `PIPES_GET_LAST(CHAIN)`
|
183
|
+
INPUT
|
184
|
+
|<h3 id="macros"><a name="macros" href="#macros" class="md2man-permalink" title="permalink"></a>Macros</h3><pre><code>#define PIPES_GET_LAST(CHAIN)
|
185
|
+
|#define PIPES_GET_IN(CHAIN)
|
186
|
+
|#define PIPES_GET_OUT(CHAIN)
|
187
|
+
|#define PIPES_GET_ERR(CHAIN)
|
188
|
+
|</code></pre>
|
189
|
+
|<h3 id="pipes_get_last-chain"><a name="pipes_get_last-chain" href="#pipes_get_last-chain" class="md2man-permalink" title="permalink"></a><code>PIPES_GET_LAST(CHAIN)</code></h3>
|
190
|
+
OUTPUT
|
191
|
+
end
|
173
192
|
end
|
data/test/md2man/roff_test.rb
CHANGED
@@ -849,14 +849,11 @@ describe 'roff engine' do
|
|
849
849
|
| <a class="md2man-reference" href="../man3/printf.3.html">printf(3)</a>
|
850
850
|
INPUT
|
851
851
|
|.PP
|
852
|
-
|For example, the \\fB\\
|
853
|
-
|.BR printf (3)\\fR#{SPACE}
|
854
|
-
|cross reference would be emitted as this HTML:
|
852
|
+
|For example, the \\fB\\fCprintf(3)\\fR cross reference would be emitted as this HTML:
|
855
853
|
|.PP
|
856
854
|
|.RS
|
857
855
|
|.nf
|
858
|
-
|<a class="md2man\\-reference" href="../man3/printf.3.html">
|
859
|
-
|.BR printf (3)</a>
|
856
|
+
|<a class="md2man\\-reference" href="../man3/printf.3.html">printf(3)</a>
|
860
857
|
|.fi
|
861
858
|
|.RE
|
862
859
|
OUTPUT
|
@@ -875,7 +872,7 @@ describe 'roff engine' do
|
|
875
872
|
OUTPUT
|
876
873
|
end
|
877
874
|
|
878
|
-
it '
|
875
|
+
it 'does not render references inside code blocks' do
|
879
876
|
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
880
877
|
| this is a code block
|
881
878
|
| containing markdown(7),
|
@@ -885,24 +882,19 @@ describe 'roff engine' do
|
|
885
882
|
|.RS
|
886
883
|
|.nf
|
887
884
|
|this is a code block
|
888
|
-
|containing
|
889
|
-
|
890
|
-
|.BR roff (7),#{SPACE}
|
891
|
-
|and much more!
|
885
|
+
|containing markdown(7),
|
886
|
+
|roff(7), and much more!
|
892
887
|
|.fi
|
893
888
|
|.RE
|
894
889
|
OUTPUT
|
895
890
|
end
|
896
891
|
|
897
|
-
it '
|
892
|
+
it 'does not render references inside code spans' do
|
898
893
|
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
899
894
|
|this is a code span `containing markdown(7), roff(7), and` much more!
|
900
895
|
INPUT
|
901
896
|
|.PP
|
902
|
-
|this is a code span \\fB\\fCcontaining
|
903
|
-
|.BR markdown (7),#{SPACE}
|
904
|
-
|.BR roff (7),#{SPACE}
|
905
|
-
|and\\fR much more!
|
897
|
+
|this is a code span \\fB\\fCcontaining markdown(7), roff(7), and\\fR much more!
|
906
898
|
OUTPUT
|
907
899
|
end
|
908
900
|
|
@@ -943,4 +935,30 @@ describe 'roff engine' do
|
|
943
935
|
|.BR exit (3tcl)
|
944
936
|
OUTPUT
|
945
937
|
end
|
938
|
+
|
939
|
+
it 'https://github.com/sunaku/md2man/issues/19' do
|
940
|
+
@markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))
|
941
|
+
|### Macros
|
942
|
+
|
|
943
|
+
| #define PIPES_GET_LAST(CHAIN)
|
944
|
+
| #define PIPES_GET_IN(CHAIN)
|
945
|
+
| #define PIPES_GET_OUT(CHAIN)
|
946
|
+
| #define PIPES_GET_ERR(CHAIN)
|
947
|
+
|
|
948
|
+
|### `PIPES_GET_LAST(CHAIN)`
|
949
|
+
INPUT
|
950
|
+
|.SS Macros
|
951
|
+
|.PP
|
952
|
+
|.RS
|
953
|
+
|.nf
|
954
|
+
|#define PIPES_GET_LAST(CHAIN)
|
955
|
+
|#define PIPES_GET_IN(CHAIN)
|
956
|
+
|#define PIPES_GET_OUT(CHAIN)
|
957
|
+
|#define PIPES_GET_ERR(CHAIN)
|
958
|
+
|.fi
|
959
|
+
|.RE
|
960
|
+
|.SS \\fB\\fCPIPES_GET_LAST(CHAIN)\\fR
|
961
|
+
OUTPUT
|
962
|
+
end
|
963
|
+
|
946
964
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: md2man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suraj N. Kurapati
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.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
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: redcarpet
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,4 +141,3 @@ signing_key:
|
|
141
141
|
specification_version: 4
|
142
142
|
summary: markdown to manpage
|
143
143
|
test_files: []
|
144
|
-
has_rdoc:
|