From 31ed04343a8761d7898f30bd0eed35136175cedb Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 17:32:38 +0100 Subject: [PATCH 01/51] Adds perl6 test from perl6/doc home --- test/markups/README.pod6 | 67 +++++++++++++++++++++++++++++++++++ test/markups/README.pod6.html | 42 ++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100755 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 100755 index 00000000..ee65afbe --- /dev/null +++ b/test/markups/README.pod6 @@ -0,0 +1,67 @@ +=begin Html + +Welcome to the official documentation of the Perl 6 +programming language! +Besides online browsing and searching, you can also +view everything in one file or +contribute +by reporting mistakes or sending patches. + +
+ +
+ +
Language Reference & Tutorials
+
+ A collection of documents describing, in detail, the various + conceptual parts of the language. + + +
+ +
Type Reference
+
+ Index of built-in classes and roles. +
+ +
Routine Reference
+
+ Index of built-in subroutines and methods. +
+ +
Perl 6 Programs
+
+ A collection of documents describing how to + run the Perl 6 executable program and other utilities, + how to debug Perl 6 programs, and how to hack on Perl 6 + source code. +
+ + + +
+ +
+ + +

The Perl 6 homepage offers a +comprehensive list of Perl 6 resources, including tutorials, how-tos +and FAQs (Frequently Asked Questions).

+ +

+Perl 6 compiler developers may also be interested in +The Perl 6 Specification. +Documentation for the different but related Perl 5 language +can be found on the Perl 5 documentation website. +

+=end Html + +# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6 diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html new file mode 100644 index 00000000..511f5390 --- /dev/null +++ b/test/markups/README.pod6.html @@ -0,0 +1,42 @@ + + + + + + + + + + + +
+ + + +
+ Welcome to the official documentation of the Perl 6 programming language! Besides online browsing and searching, you can also view everything in one file or contribute by reporting mistakes or sending patches.
Language Reference & Tutorials
A collection of documents describing, in detail, the various conceptual parts of the language.
Type Reference
Index of built-in classes and roles.
Routine Reference
Index of built-in subroutines and methods.
Perl 6 Programs
A collection of documents describing how to run the Perl 6 executable program and other utilities, how to debug Perl 6 programs, and how to hack on Perl 6 source code.

The Perl 6 homepage offers a comprehensive list of Perl 6 resources, including tutorials, how-tos and FAQs (Frequently Asked Questions).

Perl 6 compiler developers may also be interested in The Perl 6 Specification. Documentation for the different but related Perl 5 language can be found on the Perl 5 documentation website.

+
+ + + + + From 3286a7eb442fcfdda59bdcd3ff7740a6a79ea971 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 17:47:28 +0100 Subject: [PATCH 02/51] Adds files (and modifies) for perl6 refs #907 --- README.md | 8 ++++++++ lib/github/commands/pod62html | 3 +++ lib/github/markup.rb | 1 + lib/github/markups.rb | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 lib/github/commands/pod62html diff --git a/README.md b/README.md index b4ab5226..b00b9023 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,14 @@ Installation gem install github-markup ``` +or + +``` +bundle install +``` + +from this directory + Usage ----- diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html new file mode 100755 index 00000000..4bea53ba --- /dev/null +++ b/lib/github/commands/pod62html @@ -0,0 +1,3 @@ +#!/bin/bash + +perl6 --doc=HTML "$1" diff --git a/lib/github/markup.rb b/lib/github/markup.rb index 84c1e45f..44344909 100644 --- a/lib/github/markup.rb +++ b/lib/github/markup.rb @@ -19,6 +19,7 @@ module Markups MARKUP_RDOC = :rdoc MARKUP_RST = :rst MARKUP_TEXTILE = :textile + MARKUP_POD6 = :pod6 end module Markup diff --git a/lib/github/markups.rb b/lib/github/markups.rb index 61138e85..917c6215 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -51,4 +51,5 @@ "restructuredtext" ) -command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, ["Pod"], "pod") +command(::GitHub::Markups::MARKUP_POD6, :pod6tohtml, /pod/, ["Pod6"], "pod6") +command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod$/, ["Pod"], "pod") From 8c5fc3d9995cfdda08b96d9606a42100e30a55f2 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 18:12:07 +0100 Subject: [PATCH 03/51] Cleanup --- .gitignore | 1 + lib/github/commands/pod62html | 2 ++ lib/github/markups.rb | 2 +- test/markup_test.rb | 5 +++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2535ee2a..c8263789 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ Gemfile.lock vendor/ .project .buildpath +*~ \ No newline at end of file diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index 4bea53ba..3b36e8f3 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -1,3 +1,5 @@ #!/bin/bash +echo "Processing " +echo "$1" perl6 --doc=HTML "$1" diff --git a/lib/github/markups.rb b/lib/github/markups.rb index 917c6215..8099846c 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -51,5 +51,5 @@ "restructuredtext" ) -command(::GitHub::Markups::MARKUP_POD6, :pod6tohtml, /pod/, ["Pod6"], "pod6") +command(::GitHub::Markups::MARKUP_POD6, :pod6tohtml, /pod6/, ["Pod6"], "pod6") command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod$/, ["Pod"], "pod") diff --git a/test/markup_test.rb b/test/markup_test.rb index 8e02ed21..709161d6 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -1,4 +1,4 @@ -# encoding: UTF-8 +# encoding: utf-8 $LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib" @@ -93,7 +93,8 @@ def test_each_render_has_a_name assert_equal "wikicloth", GitHub::Markup.renderer('README.wiki', '

Title

').name assert_equal "asciidoctor", GitHub::Markup.renderer('README.adoc', '== Title').name assert_equal "restructuredtext", GitHub::Markup.renderer('README.rst', 'Title').name - assert_equal "pod", GitHub::Markup.renderer('README.pod', '=begin').name + assert_equal "pod", GitHub::Markup.renderer('README.pod', '=head1').name + assert_equal "pod6", GitHub::Markup.renderer('README.pod6', '=begin').name end def test_rendering_by_symbol From c08633c4d2772aa56ac3f48dec28797291d75198 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 18:12:41 +0100 Subject: [PATCH 04/51] Cleanup --- test/markup_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/markup_test.rb b/test/markup_test.rb index 709161d6..f417d915 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -93,8 +93,8 @@ def test_each_render_has_a_name assert_equal "wikicloth", GitHub::Markup.renderer('README.wiki', '

Title

').name assert_equal "asciidoctor", GitHub::Markup.renderer('README.adoc', '== Title').name assert_equal "restructuredtext", GitHub::Markup.renderer('README.rst', 'Title').name - assert_equal "pod", GitHub::Markup.renderer('README.pod', '=head1').name - assert_equal "pod6", GitHub::Markup.renderer('README.pod6', '=begin').name +# assert_equal "pod", GitHub::Markup.renderer('README.pod', '=head1').name +# assert_equal "pod6", GitHub::Markup.renderer('README.pod6', '=begin').name end def test_rendering_by_symbol From a6dc07724335a51e7f9cff860522beaaec1d2c7e Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 20:33:04 +0100 Subject: [PATCH 05/51] Reduced errors to 0 --- lib/github/commands/pod62html | 9 +- lib/github/markup.rb | 1 - lib/github/markups.rb | 2 +- test/markup_test.rb | 5 +- test/markups/README.pod6 | 215 ++++++++++++++++++++++++---------- test/markups/README.pod6.html | 154 +++++++++++++++++++++--- 6 files changed, 292 insertions(+), 94 deletions(-) diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index 3b36e8f3..28937eca 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -1,5 +1,6 @@ -#!/bin/bash +#!/usr/bin/env perl6 -echo "Processing " -echo "$1" -perl6 --doc=HTML "$1" +use v6; + +use Pod::To::HTML; +put Pod::To::HTML.render(slurp); diff --git a/lib/github/markup.rb b/lib/github/markup.rb index 44344909..4f22c9ea 100644 --- a/lib/github/markup.rb +++ b/lib/github/markup.rb @@ -74,7 +74,6 @@ def command(symbol, command, regexp, languages, name, &block) if File.exist?(file = File.dirname(__FILE__) + "/commands/#{command}") command = file end - markup_impl(symbol, CommandImplementation.new(regexp, languages, command, name, &block)) end diff --git a/lib/github/markups.rb b/lib/github/markups.rb index 8099846c..278e7068 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -51,5 +51,5 @@ "restructuredtext" ) -command(::GitHub::Markups::MARKUP_POD6, :pod6tohtml, /pod6/, ["Pod6"], "pod6") +command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Perl 6"], "pod6") command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod$/, ["Pod"], "pod") diff --git a/test/markup_test.rb b/test/markup_test.rb index f417d915..66195103 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -52,7 +52,6 @@ def call define_method "test_#{markup}" do skip "Skipping MediaWiki test because wikicloth is currently not compatible with JRuby." if markup == "mediawiki" && RUBY_PLATFORM == "java" - source = File.read(readme) expected_file = "#{readme}.html" expected = File.read(expected_file).rstrip @@ -67,7 +66,6 @@ def call f.close_write f.read end - assert_html_equal expected, actual, <Title').name assert_equal "asciidoctor", GitHub::Markup.renderer('README.adoc', '== Title').name assert_equal "restructuredtext", GitHub::Markup.renderer('README.rst', 'Title').name -# assert_equal "pod", GitHub::Markup.renderer('README.pod', '=head1').name -# assert_equal "pod6", GitHub::Markup.renderer('README.pod6', '=begin').name + assert_equal "pod", GitHub::Markup.renderer('README.pod', '=head1').name end def test_rendering_by_symbol diff --git a/test/markups/README.pod6 b/test/markups/README.pod6 index ee65afbe..a153b1bb 100755 --- a/test/markups/README.pod6 +++ b/test/markups/README.pod6 @@ -1,67 +1,152 @@ -=begin Html - -Welcome to the official documentation of the Perl 6 -programming language! -Besides online browsing and searching, you can also -view everything in one file or -contribute -by reporting mistakes or sending patches. - -
- -
- -
Language Reference & Tutorials
-
- A collection of documents describing, in detail, the various - conceptual parts of the language. - - -
- -
Type Reference
-
- Index of built-in classes and roles. -
- -
Routine Reference
-
- Index of built-in subroutines and methods. -
- -
Perl 6 Programs
-
- A collection of documents describing how to - run the Perl 6 executable program and other utilities, - how to debug Perl 6 programs, and how to hack on Perl 6 - source code. -
- - - -
- -
- - -

The Perl 6 homepage offers a -comprehensive list of Perl 6 resources, including tutorials, how-tos -and FAQs (Frequently Asked Questions).

- -

-Perl 6 compiler developers may also be interested in -The Perl 6 Specification. -Documentation for the different but related Perl 5 language -can be found on the Perl 5 documentation website. -

-=end Html +=begin pod + +=TITLE About the Docs + +=SUBTITLE Meta-documentation + +This document collection represents the on-going effort to document the Perl 6 programming +language with the goals of being: comprehensive; easy to use; easy to +navigate; and useful to both newcomers and experienced Perl 6 +programmers. + +An HTML version of the documentation is located online at +L. + +The official source for this documentation is located at L. + +This particular document is a quick overview of the process +described in more detail in L. +This document also provides a short introduction to writing Perl 6 +Pod files, which can be rendered into HTML and other formats. + +=head1 Structure + +All of the documentation is written in Perl 6 Pod and kept in the C +directory, and the C and C sub-directories. +These files are processed as collections of definitions or +"documentables", which are then post-processed and linked together. + +=head1 Generating HTML from Pod + +To generate HTML from the Pod files, you'll need: + +=item A recent version of the Rakudo Perl 6 compiler + +=item The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape +(can be installed via L). + +=item B: L, for creating graphs +of the relationships between Perl 6 types + +=item B: L and L, for syntax +highlighting + +To generate the documentation into the C folder, run: + +=begin code :lang +perl6 htmlify.p6 +=end code + +To host the documentation from a web server, have Perl 5 +and Mojolicious::Lite installed, then run: + +=begin code :lang +perl app.pl daemon +=end code + +=head1 Contributing + +The documentation is written in Perl 6 Pod. + +For a quick introduction to Perl 6 Pod, see L. + +For full details about the Perl 6 Pod specification, see L. + +=head2 Adding definitions + +Documentables can be defined using an C<=headN> Pod directive, where +C is greater than zero (e.g., C<=head1>, C<=head2>, …). + +All of the paragraphs and blocks following that directive, up until the +next directive of the same level, will be considered part of the +documentable. So, in: + +=begin code :allow :skip-test +=head2 R + +Some paragraphs, followed by some code: + + my Code $examples = "amazing"; + +Mind === blown. + +=head3 Minor details about R + +It's fantastic. + +=head2 And now, for something completely different + +… + +=end code + +The documentable R extends down to the C<=head2 And now…>. + +Documentables may contain other documentables. Class documentables, for +example, often contain the methods the class implements. + +Definitions must be in one of the following forms to be recognized as +the start of a documentable named, say, þ. First the code in the document source: + +=begin code :skip-test + +=item X | infix,þ> (This a special case, which +is always considered a definition) + +=item C + +=item B Infix> + +=item C + +=item B> + +=item C (A special case for the L documentables) + +=end code + +Then the results on the rendered page: + +=item X | infix,þ> (This is a special case, which +is always considered a definition) + +=item C + +=item B Infix> + +=item C + +=item B> + +=item C (A special case for the L documentables) + +These items should now be searchable by using the search field in the HTML docs. + +You can add emphasis with bold (B >>) or italicized (B >>), +with or without code formatting (B >>). Due to current parser limitations, +special steps have to be taken to use B >> with other formatting codes; for example: + +=begin code :skip-test +=item X|foo> a fancy subroutine +=end code + +renders like this + +=item X|foo> a fancy subroutine + +Notice that text after a pipe ('|') has no formatting. Also note that B >> +preserves spaces and treats text as verbatim. +=end pod # vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6 diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html index 511f5390..c0039bc8 100644 --- a/test/markups/README.pod6.html +++ b/test/markups/README.pod6.html @@ -1,16 +1,14 @@ - - - - - - - - - -
+ + +
-
- Welcome to the official documentation of the Perl 6 programming language! Besides online browsing and searching, you can also view everything in one file or contribute by reporting mistakes or sending patches.
Language Reference & Tutorials
A collection of documents describing, in detail, the various conceptual parts of the language.
Type Reference
Index of built-in classes and roles.
Routine Reference
Index of built-in subroutines and methods.
Perl 6 Programs
A collection of documents describing how to run the Perl 6 executable program and other utilities, how to debug Perl 6 programs, and how to hack on Perl 6 source code.

The Perl 6 homepage offers a comprehensive list of Perl 6 resources, including tutorials, how-tos and FAQs (Frequently Asked Questions).

Perl 6 compiler developers may also be interested in The Perl 6 Specification. Documentation for the different but related Perl 5 language can be found on the Perl 5 documentation website.

-
+

About the Docs

+

Meta-documentation

+ + +

Table of Contents

+ + + + + + + + + + + + + + + + + +
1Structure
2Generating HTML from Pod
3Contributing
3.1Adding definitions
+ + +
+

This document collection represents the on-going effort to document the Perl 6 programming language with the goals of being: comprehensive; easy to use; easy to navigate; and useful to both newcomers and experienced Perl 6 programmers.

+

An HTML version of the documentation is located online at https://docs.perl6.org.

+

The official source for this documentation is located at perl6/doc on GitHub.

+

This particular document is a quick overview of the process described in more detail in CONTRIBUTING on GitHub. This document also provides a short introduction to writing Perl 6 Pod files, which can be rendered into HTML and other formats.

+

Structure

+

All of the documentation is written in Perl 6 Pod and kept in the doc/ directory, and the doc/Language/ and doc/Type/ sub-directories. These files are processed as collections of definitions or "documentables", which are then post-processed and linked together.

+

Generating HTML from Pod

+

To generate HTML from the Pod files, you'll need:

+
    +
  • +

    A recent version of the Rakudo Perl 6 compiler

    +
  • +
  • +

    The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape (can be installed via zef).

    +
  • +
  • +

    Optional: GraphViz, for creating graphs of the relationships between Perl 6 types

    +
  • +
  • +

    Optional: Atom Highlights and language-perl6, for syntax highlighting

    +
  • +
+

To generate the documentation into the html/ folder, run:

+
perl6 htmlify.p6
+
+

To host the documentation from a web server, have Perl 5 and Mojolicious::Lite installed, then run:

+
perl app.pl daemon
+
+

Contributing

+

The documentation is written in Perl 6 Pod.

+

For a quick introduction to Perl 6 Pod, see Perl 6 Pod.

+

For full details about the Perl 6 Pod specification, see Synopsis 26, Documentation.

+

Adding definitions

+

Documentables can be defined using an =headN Pod directive, where N is greater than zero (e.g., =head1, =head2, …).

+

All of the paragraphs and blocks following that directive, up until the next directive of the same level, will be considered part of the documentable. So, in:

+
=head2 My Definition
+
+Some paragraphs, followed by some code:
+
+    my Code $examples = "amazing";
+
+Mind === blown.
+
+=head3 Minor details about My Definition
 
-
-
+It's fantastic.
 
+=head2 And now, for something completely different
+
+…
+
+
+

The documentable My Definition extends down to the =head2 And now….

+

Documentables may contain other documentables. Class documentables, for example, often contain the methods the class implements.

+

Definitions must be in one of the following forms to be recognized as the start of a documentable named, say, þ. First the code in the document source:

+
=item X<C<How to use the þ infix> | infix,þ> (This a special case, which
+is always considered a definition)
+
+=item C<The þ Infix>
+
+=item B<The C<þ> Infix>
+
+=item C<Infix þ>
+
+=item B<Infix C<þ>>
+
+=item C<trait is cached> (A special case for the L<trait|/language/functions#Traits> documentables)
+
+
+

Then the results on the rendered page:

+
    +
  • +

    How to use the þ infix (This is a special case, which is always considered a definition)

    +
  • +
  • +

    The þ Infix

    +
  • +
  • +

    The þ Infix

    +
  • +
  • +

    Infix þ

    +
  • +
  • +

    Infix þ

    +
  • +
  • +

    trait is cached (A special case for the trait documentables)

    +
  • +
+

These items should now be searchable by using the search field in the HTML docs.

+

You can add emphasis with bold ( B<> ) or italicized ( I<> ), with or without code formatting ( C<> ). Due to current parser limitations, special steps have to be taken to use X<> with other formatting codes; for example:

+
=item X<B<foo>|foo> a fancy subroutine
+
+

renders like this

+
    +
  • +

    foo a fancy subroutine

    +
  • +
+

Notice that text after a pipe ('|') has no formatting. Also note that C<> preserves spaces and treats text as verbatim.

+ +
From f3cd92ace7794575892567c4e20555ee44893725 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 20:37:38 +0100 Subject: [PATCH 06/51] Test-driving travis now --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f118d5cc..f46ceb8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ git: before_install: - sudo apt-get update -qq - sudo apt-get install perl + - wget -O /tmp/perl6.deb https://nxadm.github.io/rakudo-pkg/latest-release.html?os=ubuntu&version=14.04&arch=amd64 && sudo dpkg -i /tmp/perl6.deb && install-zef-as-user && zef install Pod::To::HTML - curl -L http://cpanmin.us | perl - --sudo App::cpanminus - sudo cpanm --installdeps --notest Pod::Simple - sudo pip install docutils From ce7705c0c327e47db9a2e486696503ee93724948 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 20:42:03 +0100 Subject: [PATCH 07/51] Use direct link --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f46ceb8b..29a41d4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ git: before_install: - sudo apt-get update -qq - sudo apt-get install perl - - wget -O /tmp/perl6.deb https://nxadm.github.io/rakudo-pkg/latest-release.html?os=ubuntu&version=14.04&arch=amd64 && sudo dpkg -i /tmp/perl6.deb && install-zef-as-user && zef install Pod::To::HTML + - wget -O /tmp/perl6.deb https://github.com/nxadm/rakudo-pkg/releases/download/v2018.02.1/rakudo-pkg-Ubuntu14.04_2018.02.1-01_amd64.deb && sudo dpkg -i /tmp/perl6.deb && install-zef-as-user && zef install Pod::To::HTML - curl -L http://cpanmin.us | perl - --sudo App::cpanminus - sudo cpanm --installdeps --notest Pod::Simple - sudo pip install docutils From fed288a7551114c9d1e39dd7fef66080d51c5fde Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 20:48:31 +0100 Subject: [PATCH 08/51] Adjusts path --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 29a41d4e..b7d7ecf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ git: before_install: - sudo apt-get update -qq - sudo apt-get install perl - - wget -O /tmp/perl6.deb https://github.com/nxadm/rakudo-pkg/releases/download/v2018.02.1/rakudo-pkg-Ubuntu14.04_2018.02.1-01_amd64.deb && sudo dpkg -i /tmp/perl6.deb && install-zef-as-user && zef install Pod::To::HTML + - wget -O /tmp/perl6.deb https://github.com/nxadm/rakudo-pkg/releases/download/v2018.02.1/rakudo-pkg-Ubuntu14.04_2018.02.1-01_amd64.deb && sudo dpkg -i /tmp/perl6.deb && export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin && install-zef-as-user && zef install Pod::To::HTML - curl -L http://cpanmin.us | perl - --sudo App::cpanminus - sudo cpanm --installdeps --notest Pod::Simple - sudo pip install docutils From d0f9a825fb2db1c30db769c771ec3ffb531ac75d Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Mon, 12 Mar 2018 21:27:24 +0100 Subject: [PATCH 09/51] Adds POD6 to README. Closes #907 when accepted (along with the rest of the commits). --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b00b9023..8bb045bc 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,8 @@ you wish to run the library. You can also run `script/bootstrap` to fetch them a * [.asciidoc, .adoc, .asc](http://asciidoc.org/) -- `gem install asciidoctor` (http://asciidoctor.org) * [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::XHTML` comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN. - +* [.pod6](https://docs.perl6.org/language/pod) -- No additional + dependency. Installation ----------- From c45c7e60b25ade1b42e6c9fc67e3c7d93d79d7ab Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Fri, 19 Oct 2018 09:52:28 +1100 Subject: [PATCH 10/51] remove RMarkdown from the linguist match list --- lib/github/markup/markdown.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github/markup/markdown.rb b/lib/github/markup/markdown.rb index aa012d48..11cf662d 100644 --- a/lib/github/markup/markdown.rb +++ b/lib/github/markup/markdown.rb @@ -31,7 +31,7 @@ class Markdown < Implementation def initialize super( /md|mkdn?|mdwn|mdown|markdown|litcoffee/i, - ["Markdown", "RMarkdown", "Literate CoffeeScript"]) + ["Markdown", "Literate CoffeeScript"]) end def load From 91736268b38d869df6ef1d4ea9902f2e8c82c69b Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Fri, 19 Oct 2018 09:55:59 +1100 Subject: [PATCH 11/51] :gem: bump to 3.0.1 --- HISTORY.md | 4 ++++ lib/github-markup.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 97f3e825..6ead2e6d 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.0.1 - 2018-10-19 + +* Remove linguist-detected RMarkdown files from the Markdown renderer [#1237](https://github.com/github/markup/pull/1237) + ## 3.0.0 - 2018-10-18 * Allow passing options through to CommonMarker [#1236](https://github.com/github/markup/pull/1236) diff --git a/lib/github-markup.rb b/lib/github-markup.rb index cb58c742..259319e2 100644 --- a/lib/github-markup.rb +++ b/lib/github-markup.rb @@ -1,6 +1,6 @@ module GitHub module Markup - VERSION = '3.0.0' + VERSION = '3.0.1' Version = VERSION end end From e70b3eedb7ac9f27b4289a8f7b541a8e971f6bf7 Mon Sep 17 00:00:00 2001 From: Jordan Webb Date: Thu, 1 Nov 2018 19:41:26 +0100 Subject: [PATCH 12/51] Clarifying dependencies. Co-Authored-By: JJ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bb045bc..71f2e5ed 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ you wish to run the library. You can also run `script/bootstrap` to fetch them a * [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::XHTML` comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN. * [.pod6](https://docs.perl6.org/language/pod) -- No additional - dependency. + dependency beyond perl6 `Pod::To::HTML` (in stdlib) Installation ----------- From 11a355bba9c6d9f25836b9be09262d2362ca9177 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Wed, 7 Nov 2018 10:38:05 +1100 Subject: [PATCH 13/51] we no longer use html-pipeline for this --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d619414..be9ef8d1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This library is the **first step** of a journey that every markup file in a repo 1. `github-markup` selects an _underlying library_ to convert the raw markup to HTML. See the list of [supported markup formats](#markups) below. 1. The HTML is sanitized, aggressively removing things that could harm you and your kin—such as `script` tags, inline-styles, and `class` or `id` attributes. 1. Syntax highlighting is performed on code blocks. See [github/linguist](https://github.com/github/linguist#syntax-highlighting) for more information about syntax highlighting. -1. The HTML is passed through other filters in the [html-pipeline](https://github.com/jch/html-pipeline) that add special sauce, such as [emoji](https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/emoji_filter.rb), [task lists](https://github.com/github/task_list/blob/master/lib/task_list/filter.rb), [named anchors](https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/toc_filter.rb), [CDN caching for images](https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/camo_filter.rb), and [autolinking](https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/autolink_filter.rb). +1. The HTML is passed through other filters that add special sauce, such as emoji, task lists, named anchors, CDN caching for images, and autolinking. 1. The resulting HTML is rendered on GitHub.com. Please note that **only the first step** is covered by this gem — the rest happens on GitHub.com. In particular, `markup` itself does no sanitization of the resulting HTML, as it expects that to be covered by whatever pipeline is consuming the HTML. From 811148744b9752e22d3c6a1db87bddf01c5107c1 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 10 Dec 2018 12:50:54 +1100 Subject: [PATCH 14/51] cleanup/fixes --- .travis.yml | 6 ++- README.md | 2 +- lib/github/markups.rb | 2 +- test/markup_test.rb | 1 + test/markups/README.pod6.html | 82 +++++++++++++++++------------------ 5 files changed, 46 insertions(+), 47 deletions(-) diff --git a/.travis.yml b/.travis.yml index b7d7ecf1..e409f596 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,11 @@ notifications: git: depth: 10 before_install: + - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61 + - echo "deb https://dl.bintray.com/nxadm/rakudo-pkg-debs `lsb_release -cs` main" | sudo tee -a /etc/apt/sources.list.d/rakudo-pkg.list - sudo apt-get update -qq - - sudo apt-get install perl - - wget -O /tmp/perl6.deb https://github.com/nxadm/rakudo-pkg/releases/download/v2018.02.1/rakudo-pkg-Ubuntu14.04_2018.02.1-01_amd64.deb && sudo dpkg -i /tmp/perl6.deb && export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin && install-zef-as-user && zef install Pod::To::HTML + - sudo apt-get install perl rakudo-pkg + - export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin && install-zef-as-user && zef install Pod::To::HTML - curl -L http://cpanmin.us | perl - --sudo App::cpanminus - sudo cpanm --installdeps --notest Pod::Simple - sudo pip install docutils diff --git a/README.md b/README.md index f023abf6..0651c33c 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ or bundle install ``` -from this directory +from this directory. Usage ----- diff --git a/lib/github/markups.rb b/lib/github/markups.rb index 518c52cc..585d54b0 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -52,4 +52,4 @@ ) command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Perl 6"], "pod6") -command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod$/, ["Pod"], "pod") +command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, ["Pod"], "pod") diff --git a/test/markup_test.rb b/test/markup_test.rb index e08b7c12..86c83ee7 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -90,6 +90,7 @@ def test_each_render_has_a_name assert_equal "asciidoctor", GitHub::Markup.renderer('README.adoc', '== Title').name assert_equal "restructuredtext", GitHub::Markup.renderer('README.rst', 'Title').name assert_equal "pod", GitHub::Markup.renderer('README.pod', '=head1').name + assert_equal "pod6", GitHub::Markup.renderer('README.pod6', '=begin pod').name end def test_rendering_by_symbol diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html index c0039bc8..5f56257f 100644 --- a/test/markups/README.pod6.html +++ b/test/markups/README.pod6.html @@ -1,35 +1,28 @@ - About the Docs - - - /* 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 } - - - - - - -
- - -

About the Docs

-

Meta-documentation

- + + + About the Docs + + + kbd { font-family: "Droid Sans Mono", "Luxi Mono", "Inconsolata", monospace } + samp { font-family: "Terminus", "Courier", "Lucida Console", monospace } + u { text-decoration: none } + .nested { + margin-left: 3em; + } + aside, u { opacity: 0.7 } + a[id^="fn-"]:target { background: #ff0 } + + + + + + +
+ +

About the Docs

+

Meta-documentation

+

Table of Contents

@@ -52,24 +45,24 @@

Table of Contents

-
-

This document collection represents the on-going effort to document the Perl 6 programming language with the goals of being: comprehensive; easy to use; easy to navigate; and useful to both newcomers and experienced Perl 6 programmers.

+
+

This document collection represents the on-going effort to document the Perl 6 programming language with the goals of being: comprehensive; easy to use; easy to navigate; and useful to both newcomers and experienced Perl 6 programmers.

An HTML version of the documentation is located online at https://docs.perl6.org.

The official source for this documentation is located at perl6/doc on GitHub.

-

This particular document is a quick overview of the process described in more detail in CONTRIBUTING on GitHub. This document also provides a short introduction to writing Perl 6 Pod files, which can be rendered into HTML and other formats.

+

This particular document is a quick overview of the process described in more detail in CONTRIBUTING on GitHub. This document also provides a short introduction to writing Perl 6 Pod files, which can be rendered into HTML and other formats.

Structure

-

All of the documentation is written in Perl 6 Pod and kept in the doc/ directory, and the doc/Language/ and doc/Type/ sub-directories. These files are processed as collections of definitions or "documentables", which are then post-processed and linked together.

+

All of the documentation is written in Perl 6 Pod and kept in the doc/ directory, and the doc/Language/ and doc/Type/ sub-directories. These files are processed as collections of definitions or "documentables", which are then post-processed and linked together.

Generating HTML from Pod

To generate HTML from the Pod files, you'll need:

  • -

    A recent version of the Rakudo Perl 6 compiler

    +

    A recent version of the Rakudo Perl 6 compiler

  • -

    The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape (can be installed via zef).

    +

    The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape (can be installed via zef).

  • -

    Optional: GraphViz, for creating graphs of the relationships between Perl 6 types

    +

    Optional: GraphViz, for creating graphs of the relationships between Perl 6 types

  • Optional: Atom Highlights and language-perl6, for syntax highlighting

    @@ -78,13 +71,13 @@

    Generating HTML from Pod

    To generate the documentation into the html/ folder, run:

    perl6 htmlify.p6
     
    -

    To host the documentation from a web server, have Perl 5 and Mojolicious::Lite installed, then run:

    +

    To host the documentation from a web server, have Perl 5 and Mojolicious::Lite installed, then run:

    perl app.pl daemon
     

    Contributing

    -

    The documentation is written in Perl 6 Pod.

    -

    For a quick introduction to Perl 6 Pod, see Perl 6 Pod.

    -

    For full details about the Perl 6 Pod specification, see Synopsis 26, Documentation.

    +

    The documentation is written in Perl 6 Pod.

    +

    For a quick introduction to Perl 6 Pod, see Perl 6 Pod.

    +

    For full details about the Perl 6 Pod specification, see Synopsis 26, Documentation.

    Adding definitions

    Documentables can be defined using an =headN Pod directive, where N is greater than zero (e.g., =head1, =head2, …).

    All of the paragraphs and blocks following that directive, up until the next directive of the same level, will be considered part of the documentable. So, in:

    @@ -155,4 +148,7 @@

    Adding definitions

Notice that text after a pipe ('|') has no formatting. Also note that C<> preserves spaces and treats text as verbatim.

-
+
+ + + From f7a96cc5a07c97e93bcfe6cce2f8c8d46dc61c9f Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 10 Dec 2018 12:50:58 +1100 Subject: [PATCH 15/51] add testing Dockerfile --- .dockerignore | 1 + Dockerfile | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..94143827 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..aa0f09aa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +FROM ubuntu:trusty + +RUN apt-get update -qq +RUN apt-get install -y apt-transport-https + +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61 +RUN echo "deb https://dl.bintray.com/nxadm/rakudo-pkg-debs `lsb_release -cs` main" | tee -a /etc/apt/sources.list.d/rakudo-pkg.list +RUN apt-get update -qq + +RUN apt-get install -y \ + perl rakudo-pkg curl git build-essential python python-pip \ + libssl-dev libreadline-dev zlib1g-dev \ + libicu-dev cmake pkg-config + +ENV PATH $PATH:/opt/rakudo-pkg/bin +RUN install-zef-as-user && zef install Pod::To::HTML + +RUN curl -L http://cpanmin.us | perl - App::cpanminus +RUN cpanm --installdeps --notest Pod::Simple + +RUN pip install docutils + +ENV PATH $PATH:/root/.rbenv/bin:/root/.rbenv/shims +RUN curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash +RUN rbenv install 2.4.1 +RUN rbenv global 2.4.1 +RUN rbenv rehash + +RUN gem install bundler + +WORKDIR /data/github-markup +COPY github-markup.gemspec . +COPY Gemfile . +COPY Gemfile.lock . +COPY lib/github-markup.rb lib/github-markup.rb +RUN bundle + +ENV LC_ALL en_US.UTF-8 +RUN locale-gen en_US.UTF-8 From 9c5ea1a94050789108afbebea8f18c2d64da20eb Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 10 Dec 2018 13:04:05 +1100 Subject: [PATCH 16/51] use linguist 7 --- github-markup.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-markup.gemspec b/github-markup.gemspec index 7c663d09..acfacd2e 100644 --- a/github-markup.gemspec +++ b/github-markup.gemspec @@ -23,5 +23,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'sanitize', '~> 2.1', '>= 2.1.0' s.add_development_dependency 'nokogiri', '~> 1.8.1' s.add_development_dependency 'nokogiri-diff', '~> 0.2.0' - s.add_development_dependency "github-linguist", "~> 6.0" + s.add_development_dependency "github-linguist", "~> 7" end From 83dfbbb31460f9ac7079f212c7bf02413ed81b05 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 10 Dec 2018 13:31:01 +1100 Subject: [PATCH 17/51] we're calling it Pod 6 --- lib/github/markups.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github/markups.rb b/lib/github/markups.rb index 585d54b0..c900594d 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -51,5 +51,5 @@ "restructuredtext" ) -command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Perl 6"], "pod6") +command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Pod 6"], "pod6") command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, ["Pod"], "pod") From e953f7083002053b72d461f1dc743ccb04f6cdef Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Tue, 11 Dec 2018 10:05:15 +1100 Subject: [PATCH 18/51] trim heading/leading text --- lib/github/commands/pod62html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index 28937eca..0416c7bc 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -3,4 +3,8 @@ use v6; use Pod::To::HTML; -put Pod::To::HTML.render(slurp); + +$_ = Pod::To::HTML.render(slurp); +s:s{\<\!doctype html\>.*\
\<\/div\>\s*} = ""; +s:s{\s*\<\/div\>\s*\<\/body\>\s*\<\/html\>\s*} = ""; +.put; From 7d24dd18b7e187d1892e389410295be9f942b487 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Tue, 11 Dec 2018 10:24:51 +1100 Subject: [PATCH 19/51] raise when lang missing --- lib/github/markup/implementation.rb | 6 +++++- test/markups/README.pod6 | 0 2 files changed, 5 insertions(+), 1 deletion(-) mode change 100755 => 100644 test/markups/README.pod6 diff --git a/lib/github/markup/implementation.rb b/lib/github/markup/implementation.rb index f2854e22..458ab0d8 100644 --- a/lib/github/markup/implementation.rb +++ b/lib/github/markup/implementation.rb @@ -8,7 +8,11 @@ def initialize(regexp, languages) @regexp = regexp if defined?(::Linguist) - @languages = languages.map {|l| Linguist::Language[l]} + @languages = languages.map do |l| + lang = Linguist::Language[l] + raise "no match for language #{l.inspect}" if lang.nil? + lang + end end end diff --git a/test/markups/README.pod6 b/test/markups/README.pod6 old mode 100755 new mode 100644 From ed385c6a840cd685f9b9e580bdb935efe0f182e8 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Tue, 11 Dec 2018 10:32:06 +1100 Subject: [PATCH 20/51] update pod6 test --- test/markups/README.pod6 | 1 - test/markups/README.pod6.html | 30 ++---------------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/test/markups/README.pod6 b/test/markups/README.pod6 index a153b1bb..c780c5be 100644 --- a/test/markups/README.pod6 +++ b/test/markups/README.pod6 @@ -149,4 +149,3 @@ Notice that text after a pipe ('|') has no formatting. Also note that B > preserves spaces and treats text as verbatim. =end pod -# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6 diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html index 5f56257f..3b55d843 100644 --- a/test/markups/README.pod6.html +++ b/test/markups/README.pod6.html @@ -1,26 +1,4 @@ - - - - About the Docs - - - kbd { font-family: "Droid Sans Mono", "Luxi Mono", "Inconsolata", monospace } - samp { font-family: "Terminus", "Courier", "Lucida Console", monospace } - u { text-decoration: none } - .nested { - margin-left: 3em; - } - aside, u { opacity: 0.7 } - a[id^="fn-"]:target { background: #ff0 } - - - - - - -
- -

About the Docs

+

About the Docs

Meta-documentation

@@ -147,8 +125,4 @@

Adding definitions

Notice that text after a pipe ('|') has no formatting. Also note that C<> preserves spaces and treats text as verbatim.

- - - - - + \ No newline at end of file From bf3ad46e3102571e471cb44a3f8bb951da1db26e Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Tue, 11 Dec 2018 11:03:08 +1100 Subject: [PATCH 21/51] vend Pod::To::HTML --- .gitignore | 3 +-- .gitmodules | 3 +++ lib/github/commands/pod62html | 2 +- vendor/Pod-To-HTML | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 vendor/Pod-To-HTML diff --git a/.gitignore b/.gitignore index c8263789..589d00dc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ pkg/ .bundle Gemfile.lock -vendor/ .project .buildpath -*~ \ No newline at end of file +*~ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..1875291b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vendor/Pod-To-HTML"] + path = vendor/Pod-To-HTML + url = https://github.com/perl6/Pod-To-HTML diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index 0416c7bc..e9e5316a 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -1,7 +1,7 @@ #!/usr/bin/env perl6 use v6; - +use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; use Pod::To::HTML; $_ = Pod::To::HTML.render(slurp); diff --git a/vendor/Pod-To-HTML b/vendor/Pod-To-HTML new file mode 160000 index 00000000..f5ea68c2 --- /dev/null +++ b/vendor/Pod-To-HTML @@ -0,0 +1 @@ +Subproject commit f5ea68c2bb2145dc79f26bf1d9489acb36c0461c From 27e4eea56f198c7a708b310db0836eae047cda76 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Tue, 11 Dec 2018 11:13:33 +1100 Subject: [PATCH 22/51] add Pod-To-HTML to gem --- github-markup.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/github-markup.gemspec b/github-markup.gemspec index acfacd2e..b143e768 100644 --- a/github-markup.gemspec +++ b/github-markup.gemspec @@ -12,6 +12,7 @@ Gem::Specification.new do |s| s.license = "MIT" s.files = `git ls-files`.split($\) + s.files += Dir['vendor/Pod-To-HTML/**/*'] s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) } s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.require_paths = %w[lib] From 455a75d86d4e159d904c5c9191927b39f1fc14b2 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Wed, 12 Dec 2018 10:15:22 +1100 Subject: [PATCH 23/51] minimum 7.1.3 --- github-markup.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-markup.gemspec b/github-markup.gemspec index b143e768..2459b753 100644 --- a/github-markup.gemspec +++ b/github-markup.gemspec @@ -24,5 +24,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'sanitize', '~> 2.1', '>= 2.1.0' s.add_development_dependency 'nokogiri', '~> 1.8.1' s.add_development_dependency 'nokogiri-diff', '~> 0.2.0' - s.add_development_dependency "github-linguist", "~> 7" + s.add_development_dependency "github-linguist", ">= 7.1.3" end From 050b57546db44eb6a1aa34219e21026128f08c0b Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Wed, 12 Dec 2018 14:49:09 +1100 Subject: [PATCH 24/51] :gem: bump to 3.0.2 --- HISTORY.md | 4 ++++ lib/github-markup.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 6ead2e6d..520743ee 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.0.2 - 2018-12-12 + +* Add support for POD6 [#1173](https://github.com/github/markup/pull/1173) + ## 3.0.1 - 2018-10-19 * Remove linguist-detected RMarkdown files from the Markdown renderer [#1237](https://github.com/github/markup/pull/1237) diff --git a/lib/github-markup.rb b/lib/github-markup.rb index 259319e2..0979d20e 100644 --- a/lib/github-markup.rb +++ b/lib/github-markup.rb @@ -1,6 +1,6 @@ module GitHub module Markup - VERSION = '3.0.1' + VERSION = '3.0.2' Version = VERSION end end From 51cb693229925f3ed275a02d066c442bf1a51661 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Fri, 14 Dec 2018 15:06:43 +1100 Subject: [PATCH 25/51] clean up regexes, remove another weird tag --- lib/github/commands/pod62html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index e9e5316a..f034a556 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -5,6 +5,7 @@ use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; use Pod::To::HTML; $_ = Pod::To::HTML.render(slurp); -s:s{\<\!doctype html\>.*\
\<\/div\>\s*} = ""; -s:s{\s*\<\/div\>\s*\<\/body\>\s*\<\/html\>\s*} = ""; +s:s{'' .* '
' \s*} = ""; +s:s{\s* '
' \s* '' \s* '' \s*} = ""; +s:s{'
Date: Mon, 17 Dec 2018 13:36:19 +1100 Subject: [PATCH 26/51] use latest Pod::To::HTML, no more eval --- .gitmodules | 3 +++ lib/github/commands/pod62html | 8 ++++++-- vendor/Pod-To-HTML | 2 +- vendor/p6-pod-load | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) create mode 160000 vendor/p6-pod-load diff --git a/.gitmodules b/.gitmodules index 1875291b..bbb6b614 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "vendor/Pod-To-HTML"] path = vendor/Pod-To-HTML url = https://github.com/perl6/Pod-To-HTML +[submodule "vendor/p6-pod-load"] + path = vendor/p6-pod-load + url = https://github.com/JJ/p6-pod-load diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index f034a556..b8c13b41 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -1,11 +1,15 @@ #!/usr/bin/env perl6 use v6; + +use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-pod-load'; +use Pod::Load; + use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; use Pod::To::HTML; -$_ = Pod::To::HTML.render(slurp); +$_ = Pod::To::HTML.render(load(slurp)); s:s{'' .* '
' \s*} = ""; s:s{\s* '
' \s* '' \s* '' \s*} = ""; -s:s{'
Date: Mon, 17 Dec 2018 13:40:07 +1100 Subject: [PATCH 27/51] tweak expected output --- test/markups/README.pod6.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html index 3b55d843..16951ee0 100644 --- a/test/markups/README.pod6.html +++ b/test/markups/README.pod6.html @@ -23,7 +23,6 @@

Table of Contents

-

This document collection represents the on-going effort to document the Perl 6 programming language with the goals of being: comprehensive; easy to use; easy to navigate; and useful to both newcomers and experienced Perl 6 programmers.

An HTML version of the documentation is located online at https://docs.perl6.org.

The official source for this documentation is located at perl6/doc on GitHub.

@@ -125,4 +124,3 @@

Adding definitions

Notice that text after a pipe ('|') has no formatting. Also note that C<> preserves spaces and treats text as verbatim.

-
\ No newline at end of file From c0452d671ae0eddb97c1614c854cf7e86224e859 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 13:54:45 +1100 Subject: [PATCH 28/51] don't install from zef --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e409f596..b6d066c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_install: - echo "deb https://dl.bintray.com/nxadm/rakudo-pkg-debs `lsb_release -cs` main" | sudo tee -a /etc/apt/sources.list.d/rakudo-pkg.list - sudo apt-get update -qq - sudo apt-get install perl rakudo-pkg - - export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin && install-zef-as-user && zef install Pod::To::HTML + - export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin - curl -L http://cpanmin.us | perl - --sudo App::cpanminus - sudo cpanm --installdeps --notest Pod::Simple - sudo pip install docutils From d1461feeb2305909dcd7e8325e5b2e1dcadac226 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 14:03:54 +1100 Subject: [PATCH 29/51] remove jvm from travis build matrix --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6d066c5..15942b74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,6 @@ rvm: - 2.2.7 - 2.3.4 - 2.4.1 - - jruby-9.1.9.0 -jdk: - - oraclejdk8 notifications: email: false git: @@ -28,6 +25,3 @@ cache: env: global: - "JRUBY_OPTS=-Xcext.enabled=true" -matrix: - allow_failures: - - rvm: jruby-9.1.9.0 From a34a7235cbd575c025f82e9713388a3b119805b8 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 14:10:19 +1100 Subject: [PATCH 30/51] add p6 uri --- .gitmodules | 3 +++ lib/github/commands/pod62html | 5 +++-- vendor/uri | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) create mode 160000 vendor/uri diff --git a/.gitmodules b/.gitmodules index bbb6b614..793e296f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "vendor/p6-pod-load"] path = vendor/p6-pod-load url = https://github.com/JJ/p6-pod-load +[submodule "vendor/uri"] + path = vendor/uri + url = https://github.com/perl6-community-modules/uri diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index b8c13b41..1c0ab8a2 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -3,9 +3,10 @@ use v6; use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-pod-load'; -use Pod::Load; - use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; +use lib $*PROGRAM.IO.parent.add: '../../../vendor/uri'; + +use Pod::Load; use Pod::To::HTML; $_ = Pod::To::HTML.render(load(slurp)); diff --git a/vendor/uri b/vendor/uri new file mode 160000 index 00000000..e5c85512 --- /dev/null +++ b/vendor/uri @@ -0,0 +1 @@ +Subproject commit e5c85512db5446fa4f7a38e421170cd602a53dce From 647fac6c17747e9194fcdee1ec547241c8d5ba39 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 14:15:55 +1100 Subject: [PATCH 31/51] add Template-Mustache submodule --- .gitmodules | 3 +++ lib/github/commands/pod62html | 1 + vendor/p6-Template-Mustache | 1 + 3 files changed, 5 insertions(+) create mode 160000 vendor/p6-Template-Mustache diff --git a/.gitmodules b/.gitmodules index 793e296f..e770ee37 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "vendor/uri"] path = vendor/uri url = https://github.com/perl6-community-modules/uri +[submodule "vendor/p6-Template-Mustache"] + path = vendor/p6-Template-Mustache + url = https://github.com/softmoth/p6-Template-Mustache diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index 1c0ab8a2..ba50226c 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -5,6 +5,7 @@ use v6; use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-pod-load'; use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; use lib $*PROGRAM.IO.parent.add: '../../../vendor/uri'; +use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-Template-Mustache'; use Pod::Load; use Pod::To::HTML; diff --git a/vendor/p6-Template-Mustache b/vendor/p6-Template-Mustache new file mode 160000 index 00000000..d84fdf30 --- /dev/null +++ b/vendor/p6-Template-Mustache @@ -0,0 +1 @@ +Subproject commit d84fdf303480622805de119024e930c05c9fd6d2 From f7fc90c212f34e5ce6d52e4bbed99d43500457c3 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 14:54:41 +1100 Subject: [PATCH 32/51] include all of vendor/ in gem --- github-markup.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-markup.gemspec b/github-markup.gemspec index 2459b753..88212c66 100644 --- a/github-markup.gemspec +++ b/github-markup.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.license = "MIT" s.files = `git ls-files`.split($\) - s.files += Dir['vendor/Pod-To-HTML/**/*'] + s.files += Dir['vendor/**/*'] s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) } s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.require_paths = %w[lib] From b8843a4b81d31495b90a0c63a3daafef45a4a2f0 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 16:45:38 +1100 Subject: [PATCH 33/51] replace with passthrough --- .gitmodules | 12 --- lib/github/commands/pod62html | 14 +--- test/markups/README.pod6 | 151 ---------------------------------- test/markups/README.pod6.html | 126 ---------------------------- vendor/Pod-To-HTML | 1 - vendor/p6-Template-Mustache | 1 - vendor/p6-pod-load | 1 - vendor/uri | 1 - 8 files changed, 1 insertion(+), 306 deletions(-) delete mode 100644 .gitmodules delete mode 100644 test/markups/README.pod6 delete mode 100644 test/markups/README.pod6.html delete mode 160000 vendor/Pod-To-HTML delete mode 160000 vendor/p6-Template-Mustache delete mode 160000 vendor/p6-pod-load delete mode 160000 vendor/uri diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e770ee37..00000000 --- a/.gitmodules +++ /dev/null @@ -1,12 +0,0 @@ -[submodule "vendor/Pod-To-HTML"] - path = vendor/Pod-To-HTML - url = https://github.com/perl6/Pod-To-HTML -[submodule "vendor/p6-pod-load"] - path = vendor/p6-pod-load - url = https://github.com/JJ/p6-pod-load -[submodule "vendor/uri"] - path = vendor/uri - url = https://github.com/perl6-community-modules/uri -[submodule "vendor/p6-Template-Mustache"] - path = vendor/p6-Template-Mustache - url = https://github.com/softmoth/p6-Template-Mustache diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index ba50226c..b2d27764 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -2,16 +2,4 @@ use v6; -use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-pod-load'; -use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; -use lib $*PROGRAM.IO.parent.add: '../../../vendor/uri'; -use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-Template-Mustache'; - -use Pod::Load; -use Pod::To::HTML; - -$_ = Pod::To::HTML.render(load(slurp)); -s:s{'' .* '
' \s*} = ""; -s:s{\s* '
' \s* '' \s* '' \s*} = ""; -s:s{'
. - -The official source for this documentation is located at L. - -This particular document is a quick overview of the process -described in more detail in L. -This document also provides a short introduction to writing Perl 6 -Pod files, which can be rendered into HTML and other formats. - -=head1 Structure - -All of the documentation is written in Perl 6 Pod and kept in the C -directory, and the C and C sub-directories. -These files are processed as collections of definitions or -"documentables", which are then post-processed and linked together. - -=head1 Generating HTML from Pod - -To generate HTML from the Pod files, you'll need: - -=item A recent version of the Rakudo Perl 6 compiler - -=item The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape -(can be installed via L). - -=item B: L, for creating graphs -of the relationships between Perl 6 types - -=item B: L and L, for syntax -highlighting - -To generate the documentation into the C folder, run: - -=begin code :lang -perl6 htmlify.p6 -=end code - -To host the documentation from a web server, have Perl 5 -and Mojolicious::Lite installed, then run: - -=begin code :lang -perl app.pl daemon -=end code - -=head1 Contributing - -The documentation is written in Perl 6 Pod. - -For a quick introduction to Perl 6 Pod, see L. - -For full details about the Perl 6 Pod specification, see L. - -=head2 Adding definitions - -Documentables can be defined using an C<=headN> Pod directive, where -C is greater than zero (e.g., C<=head1>, C<=head2>, …). - -All of the paragraphs and blocks following that directive, up until the -next directive of the same level, will be considered part of the -documentable. So, in: - -=begin code :allow :skip-test -=head2 R - -Some paragraphs, followed by some code: - - my Code $examples = "amazing"; - -Mind === blown. - -=head3 Minor details about R - -It's fantastic. - -=head2 And now, for something completely different - -… - -=end code - -The documentable R extends down to the C<=head2 And now…>. - -Documentables may contain other documentables. Class documentables, for -example, often contain the methods the class implements. - -Definitions must be in one of the following forms to be recognized as -the start of a documentable named, say, þ. First the code in the document source: - -=begin code :skip-test - -=item X | infix,þ> (This a special case, which -is always considered a definition) - -=item C - -=item B Infix> - -=item C - -=item B> - -=item C (A special case for the L documentables) - -=end code - -Then the results on the rendered page: - -=item X | infix,þ> (This is a special case, which -is always considered a definition) - -=item C - -=item B Infix> - -=item C - -=item B> - -=item C (A special case for the L documentables) - -These items should now be searchable by using the search field in the HTML docs. - -You can add emphasis with bold (B >>) or italicized (B >>), -with or without code formatting (B >>). Due to current parser limitations, -special steps have to be taken to use B >> with other formatting codes; for example: - -=begin code :skip-test -=item X|foo> a fancy subroutine -=end code - -renders like this - -=item X|foo> a fancy subroutine - -Notice that text after a pipe ('|') has no formatting. Also note that B >> -preserves spaces and treats text as verbatim. -=end pod - diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html deleted file mode 100644 index 16951ee0..00000000 --- a/test/markups/README.pod6.html +++ /dev/null @@ -1,126 +0,0 @@ -

About the Docs

-

Meta-documentation

- - -

Table of Contents

- - - - - - - - - - - - - - - - - -
1Structure
2Generating HTML from Pod
3Contributing
3.1Adding definitions
- - -

This document collection represents the on-going effort to document the Perl 6 programming language with the goals of being: comprehensive; easy to use; easy to navigate; and useful to both newcomers and experienced Perl 6 programmers.

-

An HTML version of the documentation is located online at https://docs.perl6.org.

-

The official source for this documentation is located at perl6/doc on GitHub.

-

This particular document is a quick overview of the process described in more detail in CONTRIBUTING on GitHub. This document also provides a short introduction to writing Perl 6 Pod files, which can be rendered into HTML and other formats.

-

Structure

-

All of the documentation is written in Perl 6 Pod and kept in the doc/ directory, and the doc/Language/ and doc/Type/ sub-directories. These files are processed as collections of definitions or "documentables", which are then post-processed and linked together.

-

Generating HTML from Pod

-

To generate HTML from the Pod files, you'll need:

-
    -
  • -

    A recent version of the Rakudo Perl 6 compiler

    -
  • -
  • -

    The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape (can be installed via zef).

    -
  • -
  • -

    Optional: GraphViz, for creating graphs of the relationships between Perl 6 types

    -
  • -
  • -

    Optional: Atom Highlights and language-perl6, for syntax highlighting

    -
  • -
-

To generate the documentation into the html/ folder, run:

-
perl6 htmlify.p6
-
-

To host the documentation from a web server, have Perl 5 and Mojolicious::Lite installed, then run:

-
perl app.pl daemon
-
-

Contributing

-

The documentation is written in Perl 6 Pod.

-

For a quick introduction to Perl 6 Pod, see Perl 6 Pod.

-

For full details about the Perl 6 Pod specification, see Synopsis 26, Documentation.

-

Adding definitions

-

Documentables can be defined using an =headN Pod directive, where N is greater than zero (e.g., =head1, =head2, …).

-

All of the paragraphs and blocks following that directive, up until the next directive of the same level, will be considered part of the documentable. So, in:

-
=head2 My Definition
-
-Some paragraphs, followed by some code:
-
-    my Code $examples = "amazing";
-
-Mind === blown.
-
-=head3 Minor details about My Definition
-
-It's fantastic.
-
-=head2 And now, for something completely different
-
-…
-
-
-

The documentable My Definition extends down to the =head2 And now….

-

Documentables may contain other documentables. Class documentables, for example, often contain the methods the class implements.

-

Definitions must be in one of the following forms to be recognized as the start of a documentable named, say, þ. First the code in the document source:

-
=item X<C<How to use the þ infix> | infix,þ> (This a special case, which
-is always considered a definition)
-
-=item C<The þ Infix>
-
-=item B<The C<þ> Infix>
-
-=item C<Infix þ>
-
-=item B<Infix C<þ>>
-
-=item C<trait is cached> (A special case for the L<trait|/language/functions#Traits> documentables)
-
-
-

Then the results on the rendered page:

-
    -
  • -

    How to use the þ infix (This is a special case, which is always considered a definition)

    -
  • -
  • -

    The þ Infix

    -
  • -
  • -

    The þ Infix

    -
  • -
  • -

    Infix þ

    -
  • -
  • -

    Infix þ

    -
  • -
  • -

    trait is cached (A special case for the trait documentables)

    -
  • -
-

These items should now be searchable by using the search field in the HTML docs.

-

You can add emphasis with bold ( B<> ) or italicized ( I<> ), with or without code formatting ( C<> ). Due to current parser limitations, special steps have to be taken to use X<> with other formatting codes; for example:

-
=item X<B<foo>|foo> a fancy subroutine
-
-

renders like this

-
    -
  • -

    foo a fancy subroutine

    -
  • -
-

Notice that text after a pipe ('|') has no formatting. Also note that C<> preserves spaces and treats text as verbatim.

diff --git a/vendor/Pod-To-HTML b/vendor/Pod-To-HTML deleted file mode 160000 index a8d07053..00000000 --- a/vendor/Pod-To-HTML +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a8d07053ce61f4bb90725d31073cf38380a171b4 diff --git a/vendor/p6-Template-Mustache b/vendor/p6-Template-Mustache deleted file mode 160000 index d84fdf30..00000000 --- a/vendor/p6-Template-Mustache +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d84fdf303480622805de119024e930c05c9fd6d2 diff --git a/vendor/p6-pod-load b/vendor/p6-pod-load deleted file mode 160000 index 66fc6158..00000000 --- a/vendor/p6-pod-load +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 66fc6158e7c22e8a7a5f90de342e799c7fb2315e diff --git a/vendor/uri b/vendor/uri deleted file mode 160000 index e5c85512..00000000 --- a/vendor/uri +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e5c85512db5446fa4f7a38e421170cd602a53dce From ea511824a331a933e8f3f2769f2ab7039d700e3c Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 16:48:48 +1100 Subject: [PATCH 34/51] :gem: bump to 3.0.3 --- HISTORY.md | 4 ++++ lib/github-markup.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 520743ee..27a471f9 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.0.3 - 2018-12-17 + +* Temporarily remove support for POD6 [#1248](https://github.com/github/markup/pull/1248) + ## 3.0.2 - 2018-12-12 * Add support for POD6 [#1173](https://github.com/github/markup/pull/1173) diff --git a/lib/github-markup.rb b/lib/github-markup.rb index 0979d20e..be7ad756 100644 --- a/lib/github-markup.rb +++ b/lib/github-markup.rb @@ -1,6 +1,6 @@ module GitHub module Markup - VERSION = '3.0.2' + VERSION = '3.0.3' Version = VERSION end end From 3e08f13ac9ba51687c3139a4c5f4ed2521ef065d Mon Sep 17 00:00:00 2001 From: jimcheung Date: Fri, 21 Dec 2018 14:39:12 +0800 Subject: [PATCH 35/51] perf(markup): add options to render_s --- lib/github/markup.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/github/markup.rb b/lib/github/markup.rb index 444907a3..1c63c8bd 100644 --- a/lib/github/markup.rb +++ b/lib/github/markup.rb @@ -47,11 +47,11 @@ def render(filename, content, symlink: false, options: {}) end end - def render_s(symbol, content) + def render_s(symbol, content, options: {}) raise ArgumentError, 'Can not render a nil.' if content.nil? if markups.key?(symbol) - markups[symbol].render(nil, content) + markups[symbol].render(nil, content, options: options) else content end From 32909da48054fdc36e8e83bf7c47ef27b1ad6a3f Mon Sep 17 00:00:00 2001 From: jimcheung Date: Fri, 21 Dec 2018 16:12:05 +0800 Subject: [PATCH 36/51] perf(markup): add test --- test/markup_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/markup_test.rb b/test/markup_test.rb index 86c83ee7..1ff2272a 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -72,7 +72,7 @@ def call message end end - + def test_knows_what_it_can_and_cannot_render assert_equal false, GitHub::Markup.can_render?('README.html', '

Title

') assert_equal true, GitHub::Markup.can_render?('README.markdown', '=== Title') @@ -92,7 +92,7 @@ def test_each_render_has_a_name assert_equal "pod", GitHub::Markup.renderer('README.pod', '=head1').name assert_equal "pod6", GitHub::Markup.renderer('README.pod6', '=begin pod').name end - + def test_rendering_by_symbol assert_equal '

test

', GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, '`test`').strip end @@ -117,5 +117,8 @@ def test_preserve_markup def test_commonmarker_options assert_equal "

hello world

\n", GitHub::Markup.render("test.md", "hello world") assert_equal "

hello world

\n", GitHub::Markup.render("test.md", "hello world", options: {commonmarker_opts: [:UNSAFE]}) + + assert_equal "

hello world

\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "hello world") + assert_equal "

hello world

\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "hello world", options: {commonmarker_opts: [:UNSAFE]}) end end From 24d25cbf924b59884caee0b3a1539202867d8cb4 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 25 Feb 2019 09:37:42 +1100 Subject: [PATCH 37/51] remove pod6 from supported list --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 0651c33c..b2bcc809 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,6 @@ you wish to run the library. You can also run `script/bootstrap` to fetch them a * [.asciidoc, .adoc, .asc](http://asciidoc.org/) -- `gem install asciidoctor` (http://asciidoctor.org) * [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::XHTML` comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN. -* [.pod6](https://docs.perl6.org/language/pod) -- No additional - dependency beyond perl6 `Pod::To::HTML` (in stdlib) Installation ----------- From 34a79756a9d3177d4f9fa7a323570f75d8db16a6 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Mon, 1 Apr 2019 23:55:47 -0600 Subject: [PATCH 38/51] upgrade to Asciidoctor 2.0.x - upgrade to Asciidoctor 2.0.x (starting with 2.0.5) - switch to fuzzy version match for asciidoctor gem - disable sectanchors (since they get removed by the sanitizer anyway) - use formal xref macro for interdocument xref in test - add test for toggling the document title using showtitle/!showtitle - add test to verify toc is generated at top of document when toc attribute is set --- Gemfile | 2 +- lib/github/markups.rb | 1 + test/markups/README.asciidoc | 4 +- test/markups/README.hidetitle.asciidoc | 4 ++ test/markups/README.hidetitle.asciidoc.html | 3 ++ test/markups/README.toc.asciidoc | 15 +++++++ test/markups/README.toc.asciidoc.html | 46 +++++++++++++++++++++ 7 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 test/markups/README.hidetitle.asciidoc create mode 100644 test/markups/README.hidetitle.asciidoc.html create mode 100644 test/markups/README.toc.asciidoc create mode 100644 test/markups/README.toc.asciidoc.html diff --git a/Gemfile b/Gemfile index cbd97b7b..61920ab8 100644 --- a/Gemfile +++ b/Gemfile @@ -11,5 +11,5 @@ gem "org-ruby", "= 0.9.9" gem "creole", "~>0.3.6" gem "wikicloth", "=0.8.3" gem "twitter-text", "~> 1.14" -gem "asciidoctor", "= 1.5.6.1" +gem "asciidoctor", "~> 2.0.5" gem "rake" diff --git a/lib/github/markups.rb b/lib/github/markups.rb index c900594d..ea816c75 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -32,6 +32,7 @@ 'showtitle' => '@', 'idprefix' => '', 'idseparator' => '-', + 'sectanchors' => nil, 'docname' => File.basename(filename, (extname = File.extname(filename))), 'docfilesuffix' => extname, 'outfilesuffix' => extname, diff --git a/test/markups/README.asciidoc b/test/markups/README.asciidoc index d3c872f7..5f65dd2b 100644 --- a/test/markups/README.asciidoc +++ b/test/markups/README.asciidoc @@ -1,4 +1,6 @@ = Document Title +// sectanchors will be ignored +:sectanchors: == First Section @@ -7,7 +9,7 @@ Refer to <> or <>. -Navigate from {docname}{outfilesuffix} to <>. +Navigate from {docname}{outfilesuffix} to xref:another-document.asciidoc[another document]. == Another Section diff --git a/test/markups/README.hidetitle.asciidoc b/test/markups/README.hidetitle.asciidoc new file mode 100644 index 00000000..38cf76b0 --- /dev/null +++ b/test/markups/README.hidetitle.asciidoc @@ -0,0 +1,4 @@ += Not Shown +:!showtitle: + +This test verifies the author can disable the document title by adding `:!showtitle:` to the document header. diff --git a/test/markups/README.hidetitle.asciidoc.html b/test/markups/README.hidetitle.asciidoc.html new file mode 100644 index 00000000..ae6b258f --- /dev/null +++ b/test/markups/README.hidetitle.asciidoc.html @@ -0,0 +1,3 @@ +
+

This test verifies the author can disable the document title by adding :!showtitle: to the document header.

+
diff --git a/test/markups/README.toc.asciidoc b/test/markups/README.toc.asciidoc new file mode 100644 index 00000000..a8e42bdd --- /dev/null +++ b/test/markups/README.toc.asciidoc @@ -0,0 +1,15 @@ += Document Title +:toc: +:toc-title: Contents + +== Section A + +=== Subsection A-1 + +=== Subsection A-2 + +== Section B + +=== Subsection B-1 + +=== Subsection B-2 diff --git a/test/markups/README.toc.asciidoc.html b/test/markups/README.toc.asciidoc.html new file mode 100644 index 00000000..e6f598cf --- /dev/null +++ b/test/markups/README.toc.asciidoc.html @@ -0,0 +1,46 @@ +

Document Title

+ +
+

Section A

+
+
+

Subsection A-1

+ +
+
+

Subsection A-2

+ +
+
+
+
+

Section B

+
+
+

Subsection B-1

+ +
+
+

Subsection B-2

+ +
+
+
From 067c18dc0a96d837e8ccce0ed8b13f2c7ce24e9e Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Wed, 3 Apr 2019 10:33:55 +1100 Subject: [PATCH 39/51] :gem: bump to 3.0.4 --- HISTORY.md | 5 +++++ lib/github-markup.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 27a471f9..981cb46c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +## 3.0.4 - 2019-04-03 + +* Expose options in #render_s [#1249](https://github.com/github/markup/pull/1249) +* Upgrade to Asciidoctor 2.0.x [#1264](https://github.com/github/markup/pull/1264) + ## 3.0.3 - 2018-12-17 * Temporarily remove support for POD6 [#1248](https://github.com/github/markup/pull/1248) diff --git a/lib/github-markup.rb b/lib/github-markup.rb index be7ad756..1bebb3ab 100644 --- a/lib/github-markup.rb +++ b/lib/github-markup.rb @@ -1,6 +1,6 @@ module GitHub module Markup - VERSION = '3.0.3' + VERSION = '3.0.4' Version = VERSION end end From 3e973e535221539b160b1d0f1fcf08d3038cbdd8 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Wed, 3 Apr 2019 10:38:15 +1100 Subject: [PATCH 40/51] use modern sanitize in tests (Vulnerability alert doesn't exactly apply as it's never used in actual execution, but that's okay.) --- github-markup.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-markup.gemspec b/github-markup.gemspec index 88212c66..f988c443 100644 --- a/github-markup.gemspec +++ b/github-markup.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'activesupport', '~> 4.0' s.add_development_dependency 'minitest', '~> 5.4', '>= 5.4.3' s.add_development_dependency 'html-pipeline', '~> 1.0' - s.add_development_dependency 'sanitize', '~> 2.1', '>= 2.1.0' + s.add_development_dependency 'sanitize', '>= 4.6.3' s.add_development_dependency 'nokogiri', '~> 1.8.1' s.add_development_dependency 'nokogiri-diff', '~> 0.2.0' s.add_development_dependency "github-linguist", ">= 7.1.3" From d3430c3f453546d9291a59c31539aa6233ebae2f Mon Sep 17 00:00:00 2001 From: jimcheung Date: Mon, 6 May 2019 18:08:59 +0800 Subject: [PATCH 41/51] feat(commonmarker): add commonmarker_exts to options --- lib/github/markup/markdown.rb | 3 ++- test/markup_test.rb | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/github/markup/markdown.rb b/lib/github/markup/markdown.rb index 11cf662d..7952bd3b 100644 --- a/lib/github/markup/markdown.rb +++ b/lib/github/markup/markdown.rb @@ -6,7 +6,8 @@ class Markdown < Implementation MARKDOWN_GEMS = { "commonmarker" => proc { |content, options: {}| commonmarker_opts = [:GITHUB_PRE_LANG].concat(options.fetch(:commonmarker_opts, [])) - CommonMarker.render_html(content, commonmarker_opts, [:tagfilter, :autolink, :table, :strikethrough]) + commonmarker_exts = options.fetch(:commonmarker_exts, [:tagfilter, :autolink, :table, :strikethrough]) + CommonMarker.render_html(content, commonmarker_opts, commonmarker_exts) }, "github/markdown" => proc { |content, options: {}| GitHub::Markdown.render(content) diff --git a/test/markup_test.rb b/test/markup_test.rb index 1ff2272a..da859944 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -120,5 +120,8 @@ def test_commonmarker_options assert_equal "

hello world

\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "hello world") assert_equal "

hello world

\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "hello world", options: {commonmarker_opts: [:UNSAFE]}) + + assert_equal "<style>.red{color: #ff2727;}</style>\n", GitHub::Markup.render("test.md", "", options: {commonmarker_opts: [:UNSAFE]}) + assert_equal "\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "", options: {commonmarker_opts: [:UNSAFE], commonmarker_exts: [:autolink, :table, :strikethrough]}) end end From 7b17174957c73e399ea8b05914fd6f0df8b7e3c2 Mon Sep 17 00:00:00 2001 From: jimcheung Date: Tue, 7 May 2019 11:56:27 +0800 Subject: [PATCH 42/51] perf(commonmarker test): improve test case --- test/markup_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/markup_test.rb b/test/markup_test.rb index da859944..4c3cc7af 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -121,7 +121,10 @@ def test_commonmarker_options assert_equal "

hello world

\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "hello world") assert_equal "

hello world

\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "hello world", options: {commonmarker_opts: [:UNSAFE]}) - assert_equal "<style>.red{color: #ff2727;}</style>\n", GitHub::Markup.render("test.md", "", options: {commonmarker_opts: [:UNSAFE]}) - assert_equal "\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "", options: {commonmarker_opts: [:UNSAFE], commonmarker_exts: [:autolink, :table, :strikethrough]}) + assert_equal "<style>.red{color: red;}</style>\n", GitHub::Markup.render("test.md", "", options: {commonmarker_opts: [:UNSAFE]}) + assert_equal "\n", GitHub::Markup.render("test.md", "", options: {commonmarker_opts: [:UNSAFE], commonmarker_exts: [:autolink, :table, :strikethrough]}) + + assert_equal "<style>.red{color: red;}</style>\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "", options: {commonmarker_opts: [:UNSAFE]}) + assert_equal "\n", GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "", options: {commonmarker_opts: [:UNSAFE], commonmarker_exts: [:autolink, :table, :strikethrough]}) end end From cd4e3e0c6705115f97d11704cabbf790259d40a6 Mon Sep 17 00:00:00 2001 From: Nick Maloucaze Date: Wed, 22 May 2019 20:02:14 -0300 Subject: [PATCH 43/51] Use squiggly HEREDOC syntax It is recommended to use the squiggly HEREDOC syntax (https://infinum.co/the-capsized-eight/multiline-strings-ruby-2-3-0-the-squiggly-heredoc) for multiline strings. --- github-markup.gemspec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/github-markup.gemspec b/github-markup.gemspec index f988c443..3cdeaef8 100644 --- a/github-markup.gemspec +++ b/github-markup.gemspec @@ -4,8 +4,10 @@ Gem::Specification.new do |s| s.name = "github-markup" s.version = GitHub::Markup::VERSION s.summary = "The code GitHub uses to render README.markup" - s.description = "This gem is used by GitHub to render any fancy markup such " + - "as Markdown, Textile, Org-Mode, etc. Fork it and add your own!" + s.description = <<~DESC + This gem is used by GitHub to render any fancy markup such as Markdown, + Textile,Org-Mode, etc. Fork it and add your own! + DESC s.authors = ["Chris Wanstrath"] s.email = "chris@ozmm.org" s.homepage = "https://github.com/github/markup" From f82c99532b199558ec861488b26f35e692d973fb Mon Sep 17 00:00:00 2001 From: Nick Maloucaze <39865913+maloucaze@users.noreply.github.com> Date: Wed, 22 May 2019 21:27:22 -0300 Subject: [PATCH 44/51] Update github-markup.gemspec Co-Authored-By: Ashe Connor --- github-markup.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-markup.gemspec b/github-markup.gemspec index 3cdeaef8..594d3507 100644 --- a/github-markup.gemspec +++ b/github-markup.gemspec @@ -6,7 +6,7 @@ Gem::Specification.new do |s| s.summary = "The code GitHub uses to render README.markup" s.description = <<~DESC This gem is used by GitHub to render any fancy markup such as Markdown, - Textile,Org-Mode, etc. Fork it and add your own! + Textile, Org-Mode, etc. Fork it and add your own! DESC s.authors = ["Chris Wanstrath"] s.email = "chris@ozmm.org" From 2710ab922c6d976137f8c1e8585ba5f41dbce90e Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Wed, 4 Sep 2019 13:43:49 +0200 Subject: [PATCH 45/51] Check whether filename is set when rendering asciidoc --- lib/github/markups.rb | 9 ++++++--- test/markup_test.rb | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/github/markups.rb b/lib/github/markups.rb index ea816c75..0ed55df0 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -33,13 +33,16 @@ 'idprefix' => '', 'idseparator' => '-', 'sectanchors' => nil, - 'docname' => File.basename(filename, (extname = File.extname(filename))), - 'docfilesuffix' => extname, - 'outfilesuffix' => extname, 'env' => 'github', 'env-github' => '', 'source-highlighter' => 'html-pipeline' } + if filename + attributes['docname'] = File.basename(filename, (extname = File.extname(filename))) + attributes['docfilesuffix'] = attributes['outfilesuffix'] = extname + else + attributes['outfilesuffix'] = '.adoc' + end Asciidoctor::Compliance.unique_id_start_index = 1 Asciidoctor.convert(content, :safe => :secure, :attributes => attributes) end diff --git a/test/markup_test.rb b/test/markup_test.rb index 4c3cc7af..24e78000 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -94,7 +94,10 @@ def test_each_render_has_a_name end def test_rendering_by_symbol - assert_equal '

test

', GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, '`test`').strip + markup = '`test`' + result = /

test<\/code><\/p>/ + assert_match result, GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, markup).strip + assert_match result, GitHub::Markup.render_s(GitHub::Markups::MARKUP_ASCIIDOC, markup).split.join end def test_raises_error_if_command_exits_non_zero From 194e363c2a2cd44caa8e799a5ef4e64fb2824f0c Mon Sep 17 00:00:00 2001 From: Aaron Harpole Date: Thu, 12 Nov 2020 19:26:19 +0000 Subject: [PATCH 46/51] bump version to 3.0.5 --- HISTORY.md | 5 +++++ lib/github-markup.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 981cb46c..8ee4e818 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +## 3.0.5 - 2020-11-12 + +* Add commonmarker_exts to commonmarker options [#1268](https://github.com/github/markup/pull/1268) +* Check whether filename is set when rendering Asciidoc. [#1290](https://github.com/github/markup/pull/1290) + ## 3.0.4 - 2019-04-03 * Expose options in #render_s [#1249](https://github.com/github/markup/pull/1249) diff --git a/lib/github-markup.rb b/lib/github-markup.rb index 1bebb3ab..4b064e0e 100644 --- a/lib/github-markup.rb +++ b/lib/github-markup.rb @@ -1,6 +1,6 @@ module GitHub module Markup - VERSION = '3.0.4' + VERSION = '3.0.5' Version = VERSION end end From b95a3068ae330690da5e20e1556502b4599cebb4 Mon Sep 17 00:00:00 2001 From: Carl Brasic Date: Tue, 30 Mar 2021 14:41:06 -0500 Subject: [PATCH 47/51] Point to python3 executable for rendering RST https://github.com/github/markup/pull/919 added support for python3, but we still explicitly shell out to the `python2` executable. Let's switch to python3 now that it's supported. This bumps the major version because it's a breaking change for anyone running in an environment with only python2. --- lib/github-markup.rb | 2 +- lib/github/markups.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/github-markup.rb b/lib/github-markup.rb index 4b064e0e..df6aa41d 100644 --- a/lib/github-markup.rb +++ b/lib/github-markup.rb @@ -1,6 +1,6 @@ module GitHub module Markup - VERSION = '3.0.5' + VERSION = '4.0.0' Version = VERSION end end diff --git a/lib/github/markups.rb b/lib/github/markups.rb index 0ed55df0..f12fb7e0 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -49,7 +49,7 @@ command( ::GitHub::Markups::MARKUP_RST, - "python2 -S #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html", + "python3 -S #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html", /re?st(\.txt)?/, ["reStructuredText"], "restructuredtext" From e1fb4356cd9064384c026b8bcb10fc88c151d505 Mon Sep 17 00:00:00 2001 From: Carl Brasic Date: Tue, 30 Mar 2021 15:31:52 -0500 Subject: [PATCH 48/51] Remove -S flag for python3 This should not be necessary anymore and its presence breaks actual use of pip which installs into the site-packages directory. --- lib/github/markups.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github/markups.rb b/lib/github/markups.rb index f12fb7e0..2c30c99d 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -49,7 +49,7 @@ command( ::GitHub::Markups::MARKUP_RST, - "python3 -S #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html", + "python3 #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html", /re?st(\.txt)?/, ["reStructuredText"], "restructuredtext" From 935ee3bb2365b372ee1a290e8f0ea4ea0ffc8c6d Mon Sep 17 00:00:00 2001 From: Carl Brasic Date: Tue, 30 Mar 2021 15:33:15 -0500 Subject: [PATCH 49/51] Update bootstrap script to use pip3 --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index 8092d517..f89f3181 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -5,4 +5,4 @@ set -e cd $(dirname "$0")/.. bundle install -easy_install docutils +pip3 install docutils From 9899397bdef227900f827001116a85f350377312 Mon Sep 17 00:00:00 2001 From: Carl Brasic Date: Tue, 30 Mar 2021 15:47:37 -0500 Subject: [PATCH 50/51] Update HTML fixture for python3 The README.rst fixture had a test that was python2-specific, it asserted that a segment of markup would be dropped from the output for containing UTF-8 chars. That's no longer true, so we can update the fixture accordingly. --- test/markups/README.rst.html | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/test/markups/README.rst.html b/test/markups/README.rst.html index 7b8e9fca..031c3c4a 100644 --- a/test/markups/README.rst.html +++ b/test/markups/README.rst.html @@ -16,6 +16,47 @@

Header 2

  • Somé UTF-8°
  • The UTF-8 quote character in this table used to cause python to go boom. Now docutils just silently ignores it.

    + +Things that are Awesome (on a scale of 1-11) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ThingAwesomeness
    Icecream7
    Honey Badgers10.5
    Nickelback-2
    Iron Man10
    Iron Man 23
    Tabular Data5
    Made up ratings11
     A block of code
     
    From 4230afedbb28a0d0e053ac51f5d74a9fdf160349 Mon Sep 17 00:00:00 2001 From: Carl Brasic Date: Wed, 31 Mar 2021 10:14:16 -0500 Subject: [PATCH 51/51] Add changelog entry --- HISTORY.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 8ee4e818..c296602b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 4.0.0 - 2021-03-31 + +* Drop support for Python 2 in RST rendering [#1456](https://github.com/github/markup/pull/1456) + ## 3.0.5 - 2020-11-12 * Add commonmarker_exts to commonmarker options [#1268](https://github.com/github/markup/pull/1268) @@ -72,8 +76,8 @@ ### Added -* Re-introduce [#537](https://github.com/github/markup/pull/537) to detect language of markup document - However `github-linguist` is optional and this gem will fallback to extensions for detection. +* Re-introduce [#537](https://github.com/github/markup/pull/537) to detect language of markup document + However `github-linguist` is optional and this gem will fallback to extensions for detection. [Full changelog](https://github.com/github/markup/compare/v1.4.9...v1.5.0)