Skip to content

Commit 493139a

Browse files
committed
try paru
1 parent 3d6ef2e commit 493139a

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Gemfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PATH
55
commander
66
gollum-lib
77
mysql2
8-
pandoc-ruby
8+
paru
99
ruby-progressbar
1010

1111
GEM
@@ -71,11 +71,11 @@ GEM
7171
notiffany (0.1.3)
7272
nenv (~> 0.1)
7373
shellany (~> 0.0)
74-
pandoc-ruby (2.1.10)
7574
parallel (1.24.0)
7675
parser (3.3.0.5)
7776
ast (~> 2.4.1)
7877
racc
78+
paru (1.2.0)
7979
pry (0.14.2)
8080
coderay (~> 1.1)
8181
method_source (~> 1.0)

caramelize.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
2222
spec.add_dependency('commander')
2323
spec.add_dependency('gollum-lib')
2424
spec.add_dependency('mysql2')
25-
spec.add_dependency('pandoc-ruby')
25+
spec.add_dependency('paru')
2626
spec.add_dependency('ruby-progressbar')
2727

2828
spec.metadata['rubygems_mfa_required'] = 'true'

lib/caramelize/filters/mediawiki_to_markdown.rb

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
require 'pandoc-ruby'
3+
require 'paru/pandoc'
44

55
module Caramelize
66
class MediawikiToMarkdown
@@ -11,7 +11,12 @@ def initialize(source_body)
1111
end
1212

1313
def run
14-
::PandocRuby.convert(source_body.dup, { from: :mediawiki, to: :markdown }, 'atx-headings')
14+
# ::PandocRuby.convert(source_body.dup, { from: :mediawiki, to: :markdown }, '--markdown-headings=atx')
15+
#
16+
Paru::Pandoc.new do
17+
from 'mediawiki'
18+
to 'markdown'
19+
end << source_body.dup
1520
end
1621
end
1722
end

0 commit comments

Comments
 (0)