Skip to content

Commit

Permalink
lets test paru
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzzwah committed Feb 29, 2024
1 parent 7fc188f commit 38d94b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -15,5 +15,5 @@ gem 'twitter-text', '~> 3.1'
gem "wikicloth", "=0.8.3"
gem 'asciidoctor', '~> 2.0', '>= 2.0.21'
gem 'rake', '~> 13.1'
gem 'pandoc-ruby', '~> 2.1', '>= 2.1.10'
gem 'paru'

8 changes: 6 additions & 2 deletions lib/github/markups.rb
@@ -1,7 +1,7 @@
require "github/markup/markdown"
require "github/markup/rdoc"
require "shellwords"
require 'pandoc-ruby'
require "paru/pandoc"

markup_impl(::GitHub::Markups::MARKUP_MARKDOWN, ::GitHub::Markup::Markdown.new)

Expand Down Expand Up @@ -49,7 +49,11 @@
end

markup(::GitHub::Markups::MARKUP_RST, :rst, /re?st(\.txt)?/, ["reStructuredText"]) do |filename, content, options: {}|
PandocRuby.new(content, from: :rst).to_html
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 38d94b6

Please sign in to comment.