Skip to content

Commit

Permalink
rst fun
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzzwah committed Feb 29, 2024
1 parent 2b23c72 commit 941efe3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/ci.yml
Expand Up @@ -11,10 +11,7 @@ jobs:
strategy:
matrix:
ruby:
- "2.4"
- "2.5"
- "2.6"
- "2.7"
- "3.3.0"
fail-fast: false

steps:
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions lib/github/markup/version.rb

This file was deleted.

14 changes: 9 additions & 5 deletions lib/github/markups.rb
Expand Up @@ -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

Expand All @@ -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' => '',
Expand All @@ -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")
Expand Down

0 comments on commit 941efe3

Please sign in to comment.