From 941efe31713b35345cc88ed327cad26bebd8860f Mon Sep 17 00:00:00 2001 From: Fuzzwah Date: Thu, 29 Feb 2024 02:08:35 +0000 Subject: [PATCH] rst fun --- .github/workflows/ci.yml | 13 +------------ lib/github/markup/version.rb | 6 ------ lib/github/markups.rb | 14 +++++++++----- 3 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 lib/github/markup/version.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52d4db54..8b21889e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,7 @@ jobs: strategy: matrix: ruby: - - "2.4" - - "2.5" - - "2.6" - - "2.7" + - "3.3.0" fail-fast: false steps: @@ -28,11 +25,6 @@ jobs: ruby-version: ${{ matrix.ruby }} bundler-cache: true - - uses: actions/setup-python@v2 - with: - # This should match lib/github/markups.rb GitHub::Markups::MARKUP_RST - python-version: '3.x' - - uses: actions/cache@v2 with: path: ~/.cache/pip @@ -49,9 +41,6 @@ jobs: curl -L http://cpanmin.us | perl - --sudo App::cpanminus sudo cpanm --installdeps --notest Pod::Simple - - name: Install Python dependencies - run: python -m pip install docutils - - name: Run rake run: | export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin diff --git a/lib/github/markup/version.rb b/lib/github/markup/version.rb deleted file mode 100644 index 98a2d3e3..00000000 --- a/lib/github/markup/version.rb +++ /dev/null @@ -1,6 +0,0 @@ -module GitHub - module Markup - VERSION = '4.0.3' - Version = VERSION - end -end \ No newline at end of file diff --git a/lib/github/markups.rb b/lib/github/markups.rb index f628c18b..949ea56f 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -11,14 +11,14 @@ markup_impl(::GitHub::Markups::MARKUP_RDOC, GitHub::Markup::RDoc.new) -markup(::GitHub::Markups::MARKUP_ORG, 'org-ruby', /org/, ["Org"], "org-ruby") do |filename, content, options: {}| +markup(::GitHub::Markups::MARKUP_ORG, 'org-ruby', /org/, ["Org"]) do |filename, content, options: {}| Orgmode::Parser.new(content, { :allow_include_files => false, :skip_syntax_highlight => true }).to_html end -markup(::GitHub::Markups::MARKUP_CREOLE, :creole, /creole/, ["Creole"], "creole") do |filename, content, options: {}| +markup(::GitHub::Markups::MARKUP_CREOLE, :creole, /creole/, ["Creole"]) do |filename, content, options: {}| Creole.creolize(content) end @@ -28,7 +28,7 @@ wikicloth.to_html(:noedit => true) end -markup(::GitHub::Markups::MARKUP_ASCIIDOC, :asciidoctor, /adoc|asc(iidoc)?/, ["AsciiDoc"], "adoc") do |filename, content, options: {}| +markup(::GitHub::Markups::MARKUP_ASCIIDOC, :asciidoctor, /adoc|asc(iidoc)?/, ["AsciiDoc"]) do |filename, content, options: {}| attributes = { 'showtitle' => '@', 'idprefix' => '', @@ -48,8 +48,12 @@ Asciidoctor.convert(content, :safe => :secure, :attributes => attributes) end -markup(::GitHub::Markups::MARKUP_RST, :rst, /re?st(\.txt)?/, ["reStructuredText"], "rst") do |filename, content, options: {}| - puts "hi" +markup(::GitHub::Markups::MARKUP_RST, :rst, /re?st(\.txt)?/, ["rst"]) do |filename, content, options: {}| + output = Paru::Pandoc.new do + from "rst" + to "html" + end << content + puts output end command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Pod 6"], "pod6")