github-markup 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +1 -0
- data/.gitignore +1 -1
- data/.gitmodules +3 -0
- data/.travis.yml +4 -1
- data/Dockerfile +39 -0
- data/HISTORY.md +4 -0
- data/README.md +11 -2
- data/github-markup.gemspec +2 -1
- data/lib/github-markup.rb +1 -1
- data/lib/github/commands/pod62html +10 -0
- data/lib/github/markup.rb +1 -0
- data/lib/github/markup/implementation.rb +5 -1
- data/lib/github/markups.rb +1 -0
- data/test/markup_test.rb +2 -3
- data/test/markups/README.pod6 +151 -0
- data/test/markups/README.pod6.html +128 -0
- data/vendor/Pod-To-HTML/LICENSE +201 -0
- data/vendor/Pod-To-HTML/META6.json +20 -0
- data/vendor/Pod-To-HTML/README.md +96 -0
- data/vendor/Pod-To-HTML/README.pod6 +42 -0
- data/vendor/Pod-To-HTML/TODO +5 -0
- data/vendor/Pod-To-HTML/lib/Pod/To/HTML.pm +691 -0
- data/vendor/Pod-To-HTML/resources/examples/01-parse-files.p6 +7 -0
- data/vendor/Pod-To-HTML/resources/examples/README.md +13 -0
- data/vendor/Pod-To-HTML/resources/examples/main.mustache +26 -0
- data/vendor/Pod-To-HTML/resources/examples/render.p6 +17 -0
- data/vendor/Pod-To-HTML/resources/templates/main.mustache +32 -0
- data/vendor/Pod-To-HTML/t/010-basic.t +29 -0
- data/vendor/Pod-To-HTML/t/020-code.t +49 -0
- data/vendor/Pod-To-HTML/t/030-comment.t +15 -0
- data/vendor/Pod-To-HTML/t/040-lists.t +82 -0
- data/vendor/Pod-To-HTML/t/050-format-x-index.t +47 -0
- data/vendor/Pod-To-HTML/t/060-table.t +108 -0
- data/vendor/Pod-To-HTML/t/070-headings.t +45 -0
- data/vendor/Pod-To-HTML/t/075-defn.t +45 -0
- data/vendor/Pod-To-HTML/t/080-lang.t +14 -0
- data/vendor/Pod-To-HTML/t/090-css.t +16 -0
- data/vendor/Pod-To-HTML/t/100-issue-37.t +16 -0
- data/vendor/Pod-To-HTML/t/110-issue-41.t +18 -0
- data/vendor/Pod-To-HTML/t/120-templates.t +42 -0
- data/vendor/Pod-To-HTML/t/templates/main.mustache +33 -0
- metadata +39 -6
@@ -0,0 +1,45 @@
|
|
1
|
+
#!perl6
|
2
|
+
|
3
|
+
use Test;
|
4
|
+
|
5
|
+
# do NOT move this below `Pod::To::HTML` line, the module exports a fake Pod::Defn
|
6
|
+
constant no-pod-defn = ::('Pod::Defn') ~~ Failure;
|
7
|
+
|
8
|
+
use Pod::To::HTML;
|
9
|
+
|
10
|
+
plan :skip-all<Compiler does not support Pod::Defn> if no-pod-defn;
|
11
|
+
plan 1;
|
12
|
+
|
13
|
+
=begin pod
|
14
|
+
|
15
|
+
=defn MAD
|
16
|
+
Affected with a high degree of intellectual independence.
|
17
|
+
|
18
|
+
=defn MEEKNESS
|
19
|
+
Uncommon patience in planning a revenge that is worth while.
|
20
|
+
|
21
|
+
=defn MORAL
|
22
|
+
Conforming to a local and mutable standard of right.
|
23
|
+
Having the quality of general expediency.
|
24
|
+
|
25
|
+
=end pod
|
26
|
+
|
27
|
+
say $=pod[0].perl;
|
28
|
+
|
29
|
+
my $html = pod2html($=pod[0]);
|
30
|
+
|
31
|
+
say $html;
|
32
|
+
ok $html ~~ ms[[
|
33
|
+
'<dl>'
|
34
|
+
'<dt>MAD</dt>'
|
35
|
+
'<dd><p>Affected with a high degree of intellectual independence.</p>'
|
36
|
+
'</dd>'
|
37
|
+
'<dt>MEEKNESS</dt>'
|
38
|
+
'<dd><p>Uncommon patience in planning a revenge that is worth while.</p>'
|
39
|
+
'</dd>'
|
40
|
+
'<dt>MORAL</dt>'
|
41
|
+
'<dd><p>Conforming to a local and mutable standard of right. Having the quality of general expediency.</p>'
|
42
|
+
'</dd>'
|
43
|
+
|
44
|
+
'</dl>'
|
45
|
+
]], 'generated html for =defn';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
use v6;
|
2
|
+
use Test;
|
3
|
+
use Pod::To::HTML;
|
4
|
+
|
5
|
+
plan 2;
|
6
|
+
|
7
|
+
=begin pod
|
8
|
+
|
9
|
+
Je suis Napoleon!
|
10
|
+
|
11
|
+
=end pod
|
12
|
+
|
13
|
+
like pod2html($=pod), /'<html lang="en">'/, 'default lang is English';
|
14
|
+
like pod2html($=pod, :lang<fr>), /'<html lang="fr">'/, 'custom lang';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
use v6;
|
2
|
+
use Test;
|
3
|
+
use Pod::To::HTML;
|
4
|
+
|
5
|
+
plan 2;
|
6
|
+
|
7
|
+
=begin pod
|
8
|
+
|
9
|
+
Je suis Napoleon!
|
10
|
+
|
11
|
+
=end pod
|
12
|
+
|
13
|
+
like pod2html($=pod), /'<link rel="stylesheet" href='/, 'default includes CSS';
|
14
|
+
unlike pod2html($=pod, :lang<fr>, :css-url('')),
|
15
|
+
/'<link rel="stylesheet" href='/,
|
16
|
+
'empty string for CSS URL disables CSS inclusion';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
use v6;
|
2
|
+
use Test;
|
3
|
+
use Pod::To::HTML;
|
4
|
+
|
5
|
+
plan 1;
|
6
|
+
|
7
|
+
# Covershttps://github.com/perl6/Pod-To-HTML/issues/37
|
8
|
+
#######
|
9
|
+
# NOTE: It's important for the test below that pod2html is NOT used
|
10
|
+
# before running the test, as doing so will hide the bug
|
11
|
+
#######
|
12
|
+
|
13
|
+
is-deeply node2html(
|
14
|
+
Pod::FormattingCode.new:
|
15
|
+
:type<L>, :meta[], :config{}, :contents["Array"]
|
16
|
+
), '<a href="Array">Array</a>', 'no crash in node2html with L<>';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
use Test;
|
2
|
+
use Pod::To::HTML;
|
3
|
+
plan 2;
|
4
|
+
|
5
|
+
=begin pod
|
6
|
+
=head2 Rendering Perl 6 with no-break space
|
7
|
+
|
8
|
+
Nothing to see here
|
9
|
+
|
10
|
+
=head2 What's wrong with this rendering?
|
11
|
+
|
12
|
+
Nothing to see here either
|
13
|
+
=end pod
|
14
|
+
|
15
|
+
my $r = pod2html $=pod;
|
16
|
+
|
17
|
+
ok $r ~~ m/\#What\'s_wrong/;
|
18
|
+
ok $r ~~ m/\#Rendering_Perl_6/;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
use Test; # -*- mode: perl6 -*-
|
2
|
+
use Test::Output;
|
3
|
+
use Pod::To::HTML;
|
4
|
+
plan 5;
|
5
|
+
my $r;
|
6
|
+
|
7
|
+
=begin pod
|
8
|
+
=TITLE The usual suspects
|
9
|
+
|
10
|
+
The seven suspects are:
|
11
|
+
|
12
|
+
=item Happy
|
13
|
+
=item Dopey
|
14
|
+
=item Sleepy
|
15
|
+
=item Bashful
|
16
|
+
=item Sneezy
|
17
|
+
=item Grumpy
|
18
|
+
=item Keyser Soze
|
19
|
+
=end pod
|
20
|
+
|
21
|
+
stderr-like {$r = pod2html $=pod[0], :templates<templates>}, /'does not contain required templates'/, 'Complains when required templates not found';
|
22
|
+
ok $r ~~ ms[[
|
23
|
+
'<p>' 'The seven suspects are:' '</p>'
|
24
|
+
'<ul>'
|
25
|
+
'<li>' '<p>' Happy '</p>' '</li>'
|
26
|
+
'<li>' '<p>' Dopey '</p>' '</li>'
|
27
|
+
'<li>' '<p>' Sleepy '</p>' '</li>'
|
28
|
+
'<li>' '<p>' Bashful '</p>' '</li>'
|
29
|
+
'<li>' '<p>' Sneezy '</p>' '</li>'
|
30
|
+
'<li>' '<p>' Grumpy '</p>' '</li>'
|
31
|
+
'<li>' '<p>' Keyser Soze '</p>' '</li>'
|
32
|
+
'</ul>'
|
33
|
+
]], 'Uses default templates';
|
34
|
+
|
35
|
+
$r = pod2html $=pod[0], :templates("t/templates");
|
36
|
+
ok $r ~~ ms[[ '<meta description="This is a new template"/>' ]], 'Gets text from new template';
|
37
|
+
ok $r ~~ ms[[ "<h1 class='title'>The usual suspects</h1>" ]], 'Fills template correctly';
|
38
|
+
|
39
|
+
my $head='<meta name=viewport content="width=device-width, initial-scale=1">';
|
40
|
+
$r = pod2html $=pod[0], :templates("t/templates"), :$head ;
|
41
|
+
ok $r ~~ ms[[ $head ]], 'headers are redered as is';
|
42
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="{{ lang }}">
|
3
|
+
<head>
|
4
|
+
<title>{{ title }}</title>
|
5
|
+
<meta charset="UTF-8" />
|
6
|
+
<meta description="This is a new template"/>
|
7
|
+
<style>
|
8
|
+
kbd { font-family: "Droid Sans Mono", "Luxi Mono", "Inconsolata", monospace }
|
9
|
+
samp { font-family: "Terminus", "Courier", "Lucida Console", monospace }
|
10
|
+
u { text-decoration: none }
|
11
|
+
.nested {
|
12
|
+
margin-left: 3em;
|
13
|
+
}
|
14
|
+
aside, u { opacity: 0.7 }
|
15
|
+
a[id^="fn-"]:target { background: #ff0 }
|
16
|
+
</style>
|
17
|
+
{{# css }}<link rel="stylesheet" href="{{ css }}">{{/ css }}
|
18
|
+
{{# metadata }}{{{ metadata }}}{{/ metadata }}
|
19
|
+
{{{ head }}}
|
20
|
+
</head>
|
21
|
+
<body class="pod">
|
22
|
+
<div id="___top"></div>
|
23
|
+
{{{ header }}}
|
24
|
+
{{# title }}<h1 class='title'>{{ title }}</h1>{{/ title }}
|
25
|
+
{{# subtitle }}<p class='subtitle'>{{ subtitle }}</p>{{/ subtitle }}
|
26
|
+
{{# toc }}{{{ toc }}}{{/ toc }}
|
27
|
+
<div class="pod-body{{^ toc }} no-toc{{/ toc }})">
|
28
|
+
{{# body }}{{{ . }}}{{/ body }}
|
29
|
+
</div>
|
30
|
+
{{# footnotes }}{{{ footnotes }}}{{/ footnotes }}
|
31
|
+
{{{ footer }}}
|
32
|
+
</body>
|
33
|
+
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-markup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -124,16 +124,16 @@ dependencies:
|
|
124
124
|
name: github-linguist
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- - "
|
127
|
+
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
129
|
+
version: 7.1.3
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- - "
|
134
|
+
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
136
|
+
version: 7.1.3
|
137
137
|
description: This gem is used by GitHub to render any fancy markup such as Markdown,
|
138
138
|
Textile, Org-Mode, etc. Fork it and add your own!
|
139
139
|
email: chris@ozmm.org
|
@@ -142,11 +142,14 @@ executables:
|
|
142
142
|
extensions: []
|
143
143
|
extra_rdoc_files: []
|
144
144
|
files:
|
145
|
+
- ".dockerignore"
|
145
146
|
- ".gitignore"
|
147
|
+
- ".gitmodules"
|
146
148
|
- ".kick"
|
147
149
|
- ".travis.yml"
|
148
150
|
- CODE_OF_CONDUCT.md
|
149
151
|
- CONTRIBUTING.md
|
152
|
+
- Dockerfile
|
150
153
|
- Gemfile
|
151
154
|
- HISTORY.md
|
152
155
|
- LICENSE
|
@@ -156,6 +159,7 @@ files:
|
|
156
159
|
- github-markup.gemspec
|
157
160
|
- lib/github-markup.rb
|
158
161
|
- lib/github/commands/pod2html
|
162
|
+
- lib/github/commands/pod62html
|
159
163
|
- lib/github/commands/rest2html
|
160
164
|
- lib/github/markup.rb
|
161
165
|
- lib/github/markup/command_implementation.rb
|
@@ -187,6 +191,8 @@ files:
|
|
187
191
|
- test/markups/README.org.html
|
188
192
|
- test/markups/README.pod
|
189
193
|
- test/markups/README.pod.html
|
194
|
+
- test/markups/README.pod6
|
195
|
+
- test/markups/README.pod6.html
|
190
196
|
- test/markups/README.rdoc
|
191
197
|
- test/markups/README.rdoc.html
|
192
198
|
- test/markups/README.rst
|
@@ -199,6 +205,31 @@ files:
|
|
199
205
|
- test/markups/README.toc.rst.html
|
200
206
|
- test/markups/README.txt
|
201
207
|
- test/markups/README.txt.html
|
208
|
+
- vendor/Pod-To-HTML/LICENSE
|
209
|
+
- vendor/Pod-To-HTML/META6.json
|
210
|
+
- vendor/Pod-To-HTML/README.md
|
211
|
+
- vendor/Pod-To-HTML/README.pod6
|
212
|
+
- vendor/Pod-To-HTML/TODO
|
213
|
+
- vendor/Pod-To-HTML/lib/Pod/To/HTML.pm
|
214
|
+
- vendor/Pod-To-HTML/resources/examples/01-parse-files.p6
|
215
|
+
- vendor/Pod-To-HTML/resources/examples/README.md
|
216
|
+
- vendor/Pod-To-HTML/resources/examples/main.mustache
|
217
|
+
- vendor/Pod-To-HTML/resources/examples/render.p6
|
218
|
+
- vendor/Pod-To-HTML/resources/templates/main.mustache
|
219
|
+
- vendor/Pod-To-HTML/t/010-basic.t
|
220
|
+
- vendor/Pod-To-HTML/t/020-code.t
|
221
|
+
- vendor/Pod-To-HTML/t/030-comment.t
|
222
|
+
- vendor/Pod-To-HTML/t/040-lists.t
|
223
|
+
- vendor/Pod-To-HTML/t/050-format-x-index.t
|
224
|
+
- vendor/Pod-To-HTML/t/060-table.t
|
225
|
+
- vendor/Pod-To-HTML/t/070-headings.t
|
226
|
+
- vendor/Pod-To-HTML/t/075-defn.t
|
227
|
+
- vendor/Pod-To-HTML/t/080-lang.t
|
228
|
+
- vendor/Pod-To-HTML/t/090-css.t
|
229
|
+
- vendor/Pod-To-HTML/t/100-issue-37.t
|
230
|
+
- vendor/Pod-To-HTML/t/110-issue-41.t
|
231
|
+
- vendor/Pod-To-HTML/t/120-templates.t
|
232
|
+
- vendor/Pod-To-HTML/t/templates/main.mustache
|
202
233
|
homepage: https://github.com/github/markup
|
203
234
|
licenses:
|
204
235
|
- MIT
|
@@ -244,6 +275,8 @@ test_files:
|
|
244
275
|
- test/markups/README.org.html
|
245
276
|
- test/markups/README.pod
|
246
277
|
- test/markups/README.pod.html
|
278
|
+
- test/markups/README.pod6
|
279
|
+
- test/markups/README.pod6.html
|
247
280
|
- test/markups/README.rdoc
|
248
281
|
- test/markups/README.rdoc.html
|
249
282
|
- test/markups/README.rst
|