Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pod6 #1185

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/github/commands/pod62html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env perl6

use v6.c;

use Pod::To::HTML;

sub MAIN()
{
Pod::To::HTML.render(
$*IN.slurp,
default-title => 'Readme',
).say;
}
1 change: 1 addition & 0 deletions lib/github/markup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Markups
MARKUP_MEDIAWIKI = :mediawiki
MARKUP_ORG = :org
MARKUP_POD = :pod
MARKUP_POD6 = :pod6
MARKUP_RDOC = :rdoc
MARKUP_RST = :rst
MARKUP_TEXTILE = :textile
Expand Down
1 change: 1 addition & 0 deletions lib/github/markups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@
)

command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, ["Pod"], "pod")
command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Pod6"], "pod6")
27 changes: 27 additions & 0 deletions test/markups/README.pod6
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
=begin pod

=TITLE Document Title

=comment This is a comment

=head2 First Section

=item One
=item Two

Refer to L<Another section|#Another_Section>.

=head2 Another Section

NOTE: Here is some source code.

MAIN() {
say "Hello GitHub!"
}

=item ☐ todo
=item ☑ done

content

=end pod
69 changes: 69 additions & 0 deletions test/markups/README.pod6.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!doctype html>
<html lang="en">
<head>
<title>Document Title</title>
<meta charset="UTF-8" />
<style>
/* code gets the browser-default font
* kbd gets a slightly less common monospace font
* samp gets the hard pixelly fonts
*/
kbd { font-family: "Droid Sans Mono", "Luxi Mono", "Inconsolata", monospace }
samp { font-family: "Terminus", "Courier", "Lucida Console", monospace }
/* WHATWG HTML frowns on the use of <u> because it looks like a link,
* so we make it not look like one.
*/
u { text-decoration: none }
.nested {
margin-left: 3em;
}
// footnote things:
aside, u { opacity: 0.7 }
a[id^="fn-"]:target { background: #ff0 }
</style>
<link rel="stylesheet" href="//design.perl6.org/perl.css">


</head>
<body class="pod">
<div id="___top"></div>


<h1 class='title'>Document Title</h1>
<nav class="indexgroup">
<table id="TOC">
<caption><h2 id="TOC_Title">Table of Contents</h2></caption>
<tr class="toc-level-2"><td class="toc-number">0.1</td><td class="toc-text"><a href="#First_Section">First Section</a></td></tr>
<tr class="toc-level-2"><td class="toc-number">0.2</td><td class="toc-text"><a href="#Another_Section">Another Section</a></td></tr>

</table>
</nav>

<div class="pod-body

">
<h2 id="First_Section"><a class="u" href="#___top" title="go to top of document">First Section</a></h2>
<ul><li><p>One</p>
</li>
<li><p>Two</p>
</li>
</ul>
<p>Refer to <a href="#Another_Section">Another section</a>.</p>
<h2 id="Another_Section"><a class="u" href="#___top" title="go to top of document">Another Section</a></h2>
<p>NOTE: Here is some source code.</p>
<pre class="pod-block-code">MAIN() {
say &quot;Hello GitHub!&quot;
}</pre>
<ul><li><p>☐ todo</p>
</li>
<li><p>☑ done</p>
</li>
</ul>
<p>content</p>

</div>


</body>
</html>