Skip to content

Commit 1f8f0cb

Browse files
committed
try paru and different gh action
1 parent 3d6ef2e commit 1f8f0cb

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v3
12-
# - name: Set up Redis
13-
# uses: zhulik/redis-action@1.1.0
14-
- name: Set up Pandoc
15-
uses: siacodelabs/setup-pandoc@v1
12+
- name: Install
13+
uses: pandoc/actions/setup@{main}
14+
with:
15+
version: 2.19
1616
- name: Install Ruby and gems
1717
uses: ruby/setup-ruby@v1
1818
with:

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

+6-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,11 @@ def initialize(source_body)
1111
end
1212

1313
def run
14-
::PandocRuby.convert(source_body.dup, { from: :mediawiki, to: :markdown }, 'atx-headings')
14+
Paru::Pandoc.new do
15+
from 'mediawiki'
16+
to 'markdown'
17+
markdown_headings 'atx'
18+
end << source_body.dup
1519
end
1620
end
1721
end

0 commit comments

Comments
 (0)