github-markup 0.3.3 → 0.4.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/HISTORY.md +4 -0
- data/lib/github/markup/version.rb +1 -1
- data/lib/github/markups.rb +0 -23
- metadata +12 -7
- data/test/markups/README.1 +0 -138
- data/test/markups/README.1.html +0 -184
data/HISTORY.md
CHANGED
data/lib/github/markups.rb
CHANGED
@@ -28,26 +28,3 @@ command("/usr/bin/env perl -MPod::Simple::HTML -e Pod::Simple::HTML::go", /pod/)
|
|
28
28
|
$1
|
29
29
|
end
|
30
30
|
end
|
31
|
-
|
32
|
-
#
|
33
|
-
# man pages!
|
34
|
-
#
|
35
|
-
command('groff -t -e -mandoc -Thtml -P -l -P -r -', /\d/) do |rendered, original|
|
36
|
-
# Try to grab the name and section.
|
37
|
-
if original =~ /^.TH (\S+).*?(\d).*$/
|
38
|
-
# Clear out the gunk, "MUSTACHE" => MUSTACHE
|
39
|
-
name, section = $1, $2
|
40
|
-
name.gsub!(/"|'/, '')
|
41
|
-
|
42
|
-
# make MUSTACHE(1)
|
43
|
-
title = "#{name}(#{section})"
|
44
|
-
|
45
|
-
# Classy divs.
|
46
|
-
left = "<div style='float:left'>#{title}</div>"
|
47
|
-
right = "<div style='float:right'>#{title}</div>"
|
48
|
-
end
|
49
|
-
|
50
|
-
if rendered =~ /<body>\s*(.+)\s*<\/body>/mi
|
51
|
-
$1.gsub(/<hr>/, '').gsub(/(<h1.+?h1>)/, "#{left}#{right}\\1")
|
52
|
-
end
|
53
|
-
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-markup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Chris Wanstrath
|
@@ -9,7 +14,7 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-04-23 00:00:00 -07:00
|
13
18
|
default_executable: github-markup
|
14
19
|
dependencies: []
|
15
20
|
|
@@ -38,8 +43,6 @@ files:
|
|
38
43
|
- lib/github/markup/version.rb
|
39
44
|
- lib/github/markups.rb
|
40
45
|
- test/markup_test.rb
|
41
|
-
- test/markups/README.1
|
42
|
-
- test/markups/README.1.html
|
43
46
|
- test/markups/README.asciidoc
|
44
47
|
- test/markups/README.asciidoc.html
|
45
48
|
- test/markups/README.markdown
|
@@ -73,18 +76,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
76
|
requirements:
|
74
77
|
- - ">="
|
75
78
|
- !ruby/object:Gem::Version
|
79
|
+
segments:
|
80
|
+
- 0
|
76
81
|
version: "0"
|
77
|
-
version:
|
78
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
83
|
requirements:
|
80
84
|
- - ">="
|
81
85
|
- !ruby/object:Gem::Version
|
86
|
+
segments:
|
87
|
+
- 0
|
82
88
|
version: "0"
|
83
|
-
version:
|
84
89
|
requirements: []
|
85
90
|
|
86
91
|
rubyforge_project:
|
87
|
-
rubygems_version: 1.3.
|
92
|
+
rubygems_version: 1.3.6
|
88
93
|
signing_key:
|
89
94
|
specification_version: 3
|
90
95
|
summary: The code we use to render README.your_favorite_markup
|
data/test/markups/README.1
DELETED
@@ -1,138 +0,0 @@
|
|
1
|
-
.\" generated with Ron/v0.3
|
2
|
-
.\" http://github.com/rtomayko/ron/
|
3
|
-
.
|
4
|
-
.TH "MUSTACHE" "1" "March 2010" "DEFUNKT" "Mustache Manual"
|
5
|
-
.
|
6
|
-
.SH "NAME"
|
7
|
-
\fBmustache\fR \-\- Mustache processor
|
8
|
-
.
|
9
|
-
.SH "SYNOPSIS"
|
10
|
-
\fBcat data.yml template.mustache | mustache\fR
|
11
|
-
.
|
12
|
-
.SH "DESCRIPTION"
|
13
|
-
Mustache is a logic\-less templating system for HTML, config files,
|
14
|
-
anything.
|
15
|
-
.
|
16
|
-
.P
|
17
|
-
The \fBmustache\fR command processes a Mustache template preceded by YAML
|
18
|
-
frontmatter from standard input and prints one or more documents to
|
19
|
-
standard output.
|
20
|
-
.
|
21
|
-
.P
|
22
|
-
YAML frontmatter beings with \fB---\fR on a single line, followed by YAML,
|
23
|
-
ending with another \fB---\fR on a single line, e.g.
|
24
|
-
.
|
25
|
-
.IP "" 4
|
26
|
-
.
|
27
|
-
.nf
|
28
|
-
|
29
|
-
\fB---
|
30
|
-
names: [ {name: chris}, {name: mark}, {name: scott} ]
|
31
|
-
--- \fR
|
32
|
-
.
|
33
|
-
.fi
|
34
|
-
.
|
35
|
-
.IP "" 0
|
36
|
-
.
|
37
|
-
.P
|
38
|
-
If you are unfamiliar with YAML, it is a superset of JSON. Valid JSON
|
39
|
-
should work fine.
|
40
|
-
.
|
41
|
-
.P
|
42
|
-
After the frontmatter should come any valid Mustache template. See
|
43
|
-
mustache(5) for an overview of Mustache templates.
|
44
|
-
.
|
45
|
-
.P
|
46
|
-
For example:
|
47
|
-
.
|
48
|
-
.IP "" 4
|
49
|
-
.
|
50
|
-
.nf
|
51
|
-
|
52
|
-
\fB{{#names}}
|
53
|
-
Hi {{name}}!
|
54
|
-
{{/names}} \fR
|
55
|
-
.
|
56
|
-
.fi
|
57
|
-
.
|
58
|
-
.IP "" 0
|
59
|
-
.
|
60
|
-
.P
|
61
|
-
Now let's combine them.
|
62
|
-
.
|
63
|
-
.IP "" 4
|
64
|
-
.
|
65
|
-
.nf
|
66
|
-
|
67
|
-
\fB$ cat data.yml
|
68
|
-
---
|
69
|
-
names: [ {name: chris}, {name: mark}, {name: scott} ]
|
70
|
-
---
|
71
|
-
$ cat template.mustache
|
72
|
-
{{#names}}
|
73
|
-
Hi {{name}}!
|
74
|
-
{{/names}}
|
75
|
-
|
76
|
-
$ cat data.yml template.mustache | mustache
|
77
|
-
Hi chris!
|
78
|
-
Hi mark!
|
79
|
-
Hi scott!
|
80
|
-
\fR
|
81
|
-
.
|
82
|
-
.fi
|
83
|
-
.
|
84
|
-
.IP "" 0
|
85
|
-
.
|
86
|
-
.P
|
87
|
-
If you provide multiple YAML documents (as delimited by \fB---\fR), your
|
88
|
-
template will be rendered multiple times. Like a mail merge.
|
89
|
-
.
|
90
|
-
.P
|
91
|
-
For example:
|
92
|
-
.
|
93
|
-
.IP "" 4
|
94
|
-
.
|
95
|
-
.nf
|
96
|
-
|
97
|
-
\fB$ cat data.yml
|
98
|
-
---
|
99
|
-
name: chris
|
100
|
-
---
|
101
|
-
name: mark
|
102
|
-
---
|
103
|
-
name: scott
|
104
|
-
---
|
105
|
-
$ cat template.mustache
|
106
|
-
Hi {{name}}!
|
107
|
-
|
108
|
-
$ cat data.yml template.mustache | mustache
|
109
|
-
Hi chris!
|
110
|
-
Hi mark!
|
111
|
-
Hi scott!
|
112
|
-
\fR
|
113
|
-
.
|
114
|
-
.fi
|
115
|
-
.
|
116
|
-
.IP "" 0
|
117
|
-
.
|
118
|
-
.SH "INSTALLATION"
|
119
|
-
If you have RubyGems installed:
|
120
|
-
.
|
121
|
-
.IP "" 4
|
122
|
-
.
|
123
|
-
.nf
|
124
|
-
|
125
|
-
\fBgem install mustache \fR
|
126
|
-
.
|
127
|
-
.fi
|
128
|
-
.
|
129
|
-
.IP "" 0
|
130
|
-
.
|
131
|
-
.SH "COPYRIGHT"
|
132
|
-
Mustache is Copyright (C) 2009 Chris Wanstrath
|
133
|
-
.
|
134
|
-
.P
|
135
|
-
Original CTemplate by Google
|
136
|
-
.
|
137
|
-
.SH "SEE ALSO"
|
138
|
-
mustache(5), mustache(7), gem(1),\fIhttp://defunkt.github.com/mustache/\fR
|
data/test/markups/README.1.html
DELETED
@@ -1,184 +0,0 @@
|
|
1
|
-
<div style='float:left'>MUSTACHE(1)</div><div style='float:right'>MUSTACHE(1)</div><h1 align=center>MUSTACHE</h1>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<a name="NAME"></a>
|
6
|
-
<h2>NAME</h2>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<p style="margin-left:11%; margin-top: 1em"><b>mustache</b>
|
11
|
-
−− Mustache processor</p>
|
12
|
-
|
13
|
-
<a name="SYNOPSIS"></a>
|
14
|
-
<h2>SYNOPSIS</h2>
|
15
|
-
|
16
|
-
|
17
|
-
<p style="margin-left:11%; margin-top: 1em"><b>cat data.yml
|
18
|
-
template.mustache | mustache</b></p>
|
19
|
-
|
20
|
-
<a name="DESCRIPTION"></a>
|
21
|
-
<h2>DESCRIPTION</h2>
|
22
|
-
|
23
|
-
|
24
|
-
<p style="margin-left:11%; margin-top: 1em">Mustache is a
|
25
|
-
logic−less templating system for HTML, config files,
|
26
|
-
anything.</p>
|
27
|
-
|
28
|
-
<p style="margin-left:11%; margin-top: 1em">The
|
29
|
-
<b>mustache</b> command processes a Mustache template
|
30
|
-
preceded by YAML frontmatter from standard input and prints
|
31
|
-
one or more documents to standard output.</p>
|
32
|
-
|
33
|
-
<p style="margin-left:11%; margin-top: 1em">YAML
|
34
|
-
frontmatter beings with <b>---</b> on a single line,
|
35
|
-
followed by YAML, ending with another <b>---</b> on a single
|
36
|
-
line, e.g.</p>
|
37
|
-
|
38
|
-
<table width="100%" border=0 rules="none" frame="void"
|
39
|
-
cellspacing="0" cellpadding="0">
|
40
|
-
<tr valign="top" align="left">
|
41
|
-
<td width="17%"></td>
|
42
|
-
<td width="5%">
|
43
|
-
|
44
|
-
|
45
|
-
<p style="margin-top: 1em" valign="top"><b>---</b></p></td>
|
46
|
-
<td width="78%">
|
47
|
-
</td>
|
48
|
-
</table>
|
49
|
-
|
50
|
-
<p style="margin-left:17%;"><b>names: [ {name: chris},
|
51
|
-
{name: mark}, {name: scott} ] <br>
|
52
|
-
---</b></p>
|
53
|
-
|
54
|
-
<p style="margin-left:11%; margin-top: 1em">If you are
|
55
|
-
unfamiliar with YAML, it is a superset of JSON. Valid JSON
|
56
|
-
should work fine.</p>
|
57
|
-
|
58
|
-
<p style="margin-left:11%; margin-top: 1em">After the
|
59
|
-
frontmatter should come any valid Mustache template. See
|
60
|
-
mustache(5) for an overview of Mustache templates.</p>
|
61
|
-
|
62
|
-
<p style="margin-left:11%; margin-top: 1em">For
|
63
|
-
example:</p>
|
64
|
-
|
65
|
-
<table width="100%" border=0 rules="none" frame="void"
|
66
|
-
cellspacing="0" cellpadding="0">
|
67
|
-
<tr valign="top" align="left">
|
68
|
-
<td width="17%"></td>
|
69
|
-
<td width="15%">
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<p style="margin-top: 1em" valign="top"><b>{{#names}}</b></p> </td>
|
74
|
-
<td width="68%">
|
75
|
-
</td>
|
76
|
-
</table>
|
77
|
-
|
78
|
-
<p style="margin-left:17%;"><b>Hi {{name}}! <br>
|
79
|
-
{{/names}}</b></p>
|
80
|
-
|
81
|
-
<p style="margin-left:11%; margin-top: 1em">Now let’s
|
82
|
-
combine them.</p>
|
83
|
-
|
84
|
-
<table width="100%" border=0 rules="none" frame="void"
|
85
|
-
cellspacing="0" cellpadding="0">
|
86
|
-
<tr valign="top" align="left">
|
87
|
-
<td width="17%"></td>
|
88
|
-
<td width="21%">
|
89
|
-
|
90
|
-
|
91
|
-
<p style="margin-top: 1em" valign="top"><b>$ cat
|
92
|
-
data.yml</b></p> </td>
|
93
|
-
<td width="62%">
|
94
|
-
</td>
|
95
|
-
</table>
|
96
|
-
|
97
|
-
<p style="margin-left:17%;"><b>--- <br>
|
98
|
-
names: [ {name: chris}, {name: mark}, {name: scott} ] <br>
|
99
|
-
--- <br>
|
100
|
-
$ cat template.mustache <br>
|
101
|
-
{{#names}} <br>
|
102
|
-
Hi {{name}}! <br>
|
103
|
-
{{/names}}</b></p>
|
104
|
-
|
105
|
-
<p style="margin-left:17%; margin-top: 1em"><b>$ cat
|
106
|
-
data.yml template.mustache | mustache <br>
|
107
|
-
Hi chris! <br>
|
108
|
-
Hi mark! <br>
|
109
|
-
Hi scott!</b></p>
|
110
|
-
|
111
|
-
<p style="margin-left:11%; margin-top: 1em">If you provide
|
112
|
-
multiple YAML documents (as delimited by <b>---</b>), your
|
113
|
-
template will be rendered multiple times. Like a mail
|
114
|
-
merge.</p>
|
115
|
-
|
116
|
-
<p style="margin-left:11%; margin-top: 1em">For
|
117
|
-
example:</p>
|
118
|
-
|
119
|
-
<table width="100%" border=0 rules="none" frame="void"
|
120
|
-
cellspacing="0" cellpadding="0">
|
121
|
-
<tr valign="top" align="left">
|
122
|
-
<td width="17%"></td>
|
123
|
-
<td width="21%">
|
124
|
-
|
125
|
-
|
126
|
-
<p style="margin-top: 1em" valign="top"><b>$ cat
|
127
|
-
data.yml</b></p> </td>
|
128
|
-
<td width="62%">
|
129
|
-
</td>
|
130
|
-
</table>
|
131
|
-
|
132
|
-
<p style="margin-left:17%;"><b>--- <br>
|
133
|
-
name: chris <br>
|
134
|
-
--- <br>
|
135
|
-
name: mark <br>
|
136
|
-
--- <br>
|
137
|
-
name: scott <br>
|
138
|
-
--- <br>
|
139
|
-
$ cat template.mustache <br>
|
140
|
-
Hi {{name}}!</b></p>
|
141
|
-
|
142
|
-
<p style="margin-left:17%; margin-top: 1em"><b>$ cat
|
143
|
-
data.yml template.mustache | mustache <br>
|
144
|
-
Hi chris! <br>
|
145
|
-
Hi mark! <br>
|
146
|
-
Hi scott!</b></p>
|
147
|
-
|
148
|
-
<a name="INSTALLATION"></a>
|
149
|
-
<h2>INSTALLATION</h2>
|
150
|
-
|
151
|
-
|
152
|
-
<p style="margin-left:11%; margin-top: 1em">If you have
|
153
|
-
RubyGems installed:</p>
|
154
|
-
|
155
|
-
<table width="100%" border=0 rules="none" frame="void"
|
156
|
-
cellspacing="0" cellpadding="0">
|
157
|
-
<tr valign="top" align="left">
|
158
|
-
<td width="17%"></td>
|
159
|
-
<td width="31%">
|
160
|
-
|
161
|
-
|
162
|
-
<p style="margin-top: 1em" valign="top"><b>gem install
|
163
|
-
mustache</b></p> </td>
|
164
|
-
<td width="52%">
|
165
|
-
</td>
|
166
|
-
</table>
|
167
|
-
|
168
|
-
<a name="COPYRIGHT"></a>
|
169
|
-
<h2>COPYRIGHT</h2>
|
170
|
-
|
171
|
-
|
172
|
-
<p style="margin-left:11%; margin-top: 1em">Mustache is
|
173
|
-
Copyright (C) 2009 Chris Wanstrath</p>
|
174
|
-
|
175
|
-
<p style="margin-left:11%; margin-top: 1em">Original
|
176
|
-
CTemplate by Google</p>
|
177
|
-
|
178
|
-
<a name="SEE ALSO"></a>
|
179
|
-
<h2>SEE ALSO</h2>
|
180
|
-
|
181
|
-
|
182
|
-
<p style="margin-left:11%; margin-top: 1em">mustache(5),
|
183
|
-
mustache(7),
|
184
|
-
gem(1),<i>http://defunkt.github.com/mustache/</i></p>
|