From 1bc2ae25c3e13bfefb5adcb79e7f9be9522f5d3c Mon Sep 17 00:00:00 2001 From: Fuzzwah Date: Thu, 29 Feb 2024 02:17:40 +0000 Subject: [PATCH] back to pandoc-ruby --- Gemfile | 2 +- lib/github/markups.rb | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 2bffeedb..082c8618 100644 --- a/Gemfile +++ b/Gemfile @@ -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 'paru', '~> 1.2.0' +gem 'pandoc-ruby', '~> 2.1.10' diff --git a/lib/github/markups.rb b/lib/github/markups.rb index 6a2e4bf5..5adf4ab4 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -1,7 +1,7 @@ require "github/markup/markdown" require "github/markup/rdoc" require "shellwords" -require "paru/pandoc" +require 'pandoc-ruby' markup_impl(::GitHub::Markups::MARKUP_MARKDOWN, ::GitHub::Markup::Markdown.new) @@ -48,12 +48,8 @@ Asciidoctor.convert(content, :safe => :secure, :attributes => attributes) end -markup(::GitHub::Markups::MARKUP_RST, :paru, /re?st(\.txt)?/, ["rst"]) do |filename, content, options: {}| - output = Paru::Pandoc.new do - from "rst" - to "html" - end << content - puts output +markup(::GitHub::Markups::MARKUP_RST, :pandoc-ruby, /re?st(\.txt)?/, ["reStructuredText"]) do |filename, content, options: {}| + PandocRuby.new(content, from: "rst").to_html end command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Pod 6"], "pod6")