diff --git a/README.md b/README.md index b529430..e05e4a5 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ pandoc2review file > file.re ## Copyright -Copyright 2020-2021 Kenshi Muto +Copyright 2020-2023 Kenshi Muto GNU General Public License Version 2 @@ -57,6 +57,9 @@ GNU General Public License Version 2 - [@takahashim](https://github.com/takahashim) ## Changelog +### 1.5.0 +- Support Pandoc 3. + ### 1.4.0 - Fix an error when empty div block is received. - Introduce '--strip-emptydev' to strip empty block `//{-//}`, produced by TeX file. diff --git a/lib/pandoc2review.rb b/lib/pandoc2review.rb index 650071f..71a814b 100644 --- a/lib/pandoc2review.rb +++ b/lib/pandoc2review.rb @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020-2021 Kenshi Muto +# Copyright 2020-2023 Kenshi Muto require 'optparse' require 'unicode/eaw' require 'pathname' @@ -55,7 +55,7 @@ def parse_args @stripemptydev = nil opts = OptionParser.new opts.banner = 'Usage: pandoc2review [option] file [file ...]' - opts.version = '1.4' + opts.version = '1.5' opts.on('--help', 'Prints this message and quit.') do puts opts.help @@ -74,7 +74,12 @@ def parse_args @stripemptydev = true end - opts.parse!(ARGV) + begin + opts.parse!(ARGV) + rescue OptionParser::ParseError + puts opts.help + exit 1 + end if ARGV.size != 1 puts opts.help exit 0 diff --git a/lua/filters.lua b/lua/filters.lua index 4dd8880..8338411 100644 --- a/lua/filters.lua +++ b/lua/filters.lua @@ -1,3 +1,5 @@ +-- Copyright 2020-2023 atusy and Kenshi Muto + local function review_inline(x) return pandoc.RawInline("review", x) end diff --git a/lua/review.lua b/lua/review.lua index 5b9b825..eca2024 100755 --- a/lua/review.lua +++ b/lua/review.lua @@ -1,6 +1,6 @@ -- -*- coding: utf-8 -*- -- Re:VIEW Writer for Pandoc --- Copyright 2020 Kenshi Muto +-- Copyright 2020-2023 atusy and Kenshi Muto -- config local config = { diff --git a/pandoc2review.gemspec b/pandoc2review.gemspec index 44b557e..f47098f 100644 --- a/pandoc2review.gemspec +++ b/pandoc2review.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = "pandoc2review" - spec.version = "1.4.0" + spec.version = "1.5.0" spec.authors = ["Kenshi Muto"] spec.email = ["kmuto@kmuto.jp"] spec.license = "GPL-2.0"