From 63cb7e6c80d549c43a51c09043459b9f9c0ab7df Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Thu, 29 Mar 2018 10:36:49 +0200 Subject: [PATCH 1/4] Add tests for POD6 --- test/markups/README.pod6 | 27 ++++++++++++++ test/markups/README.pod6.html | 69 +++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 test/markups/README.pod6 create mode 100644 test/markups/README.pod6.html diff --git a/test/markups/README.pod6 b/test/markups/README.pod6 new file mode 100644 index 00000000..c0c6abf0 --- /dev/null +++ b/test/markups/README.pod6 @@ -0,0 +1,27 @@ +=begin pod + +=TITLE Document Title + +=comment This is a comment + +=head1 First Section + +=item One +=item Two + +Refer to L. + +=head1 Another Section + +NOTE: Here is some source code. + + MAIN() { + say "Hello GitHub!" + } + +=item ☐ todo +=item ☑ done + +content + +=end pod diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html new file mode 100644 index 00000000..be27c9e5 --- /dev/null +++ b/test/markups/README.pod6.html @@ -0,0 +1,69 @@ + + + + Document Title + + + + + + + +
+ + +

Document Title

+ + +
+

First Section

+
  • One

    +
  • +
  • Two

    +
  • +
+

Refer to Another section.

+

Another Section

+

NOTE: Here is some source code.

+
MAIN() {
+  say "Hello GitHub!"
+}
+
  • ☐ todo

    +
  • +
  • ☑ done

    +
  • +
+

content

+ +
+ + + + + From be6b3c60cc87d15557a3e594e5b3eebe4407dd5b Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Thu, 29 Mar 2018 10:57:57 +0200 Subject: [PATCH 2/4] Update tests for pod6 --- test/markups/README.pod6 | 4 ++-- test/markups/README.pod6.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/markups/README.pod6 b/test/markups/README.pod6 index c0c6abf0..d1d31c61 100644 --- a/test/markups/README.pod6 +++ b/test/markups/README.pod6 @@ -4,14 +4,14 @@ =comment This is a comment -=head1 First Section +=head2 First Section =item One =item Two Refer to L. -=head1 Another Section +=head2 Another Section NOTE: Here is some source code. diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html index be27c9e5..01d97df3 100644 --- a/test/markups/README.pod6.html +++ b/test/markups/README.pod6.html @@ -33,8 +33,8 @@

Document Title

@@ -42,14 +42,14 @@

Document Title

-

First Section

+

First Section

  • One

  • Two

Refer to Another section.

-

Another Section

+

Another Section

NOTE: Here is some source code.

MAIN() {
   say "Hello GitHub!"

From ec8867f127b7cbfd0a63d6f1d300ba6e65824518 Mon Sep 17 00:00:00 2001
From: Patrick Spek 
Date: Thu, 29 Mar 2018 10:59:14 +0200
Subject: [PATCH 3/4] Add command to convert pod6 to html

---
 lib/github/commands/pod62html | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100755 lib/github/commands/pod62html

diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html
new file mode 100755
index 00000000..97a2fb3f
--- /dev/null
+++ b/lib/github/commands/pod62html
@@ -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;
+}

From 5bc29f1cc8684e8f047b3429c4e00cbdc9bce740 Mon Sep 17 00:00:00 2001
From: Patrick Spek 
Date: Thu, 29 Mar 2018 10:59:25 +0200
Subject: [PATCH 4/4] Add pod6 to markups

---
 lib/github/markup.rb  | 1 +
 lib/github/markups.rb | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/github/markup.rb b/lib/github/markup.rb
index 84c1e45f..d6b5cca5 100644
--- a/lib/github/markup.rb
+++ b/lib/github/markup.rb
@@ -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
diff --git a/lib/github/markups.rb b/lib/github/markups.rb
index 61138e85..6c4da8e8 100644
--- a/lib/github/markups.rb
+++ b/lib/github/markups.rb
@@ -52,3 +52,4 @@
 )
 
 command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, ["Pod"], "pod")
+command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Pod6"], "pod6")