Description: Add more recent Pandoc versions Author: Jakob Voss Last-Update: 2022-12-26 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/lib/Pandoc/Elements.pm +++ b/lib/Pandoc/Elements.pm @@ -23,6 +23,23 @@ # release version => minimal required api version my @REQUIRED_API = map { Pandoc::Version->new($_) } + '2.16' => '1.22', # pandoc 2.9 requires pandoc-types 1.22 + '2.15' => '1.22', # pandoc 2.9 requires pandoc-types 1.22 + '2.14' => '1.22', # pandoc 2.9 requires pandoc-types 1.22 + '2.13' => '1.22', # pandoc 2.9 requires pandoc-types 1.22 + '2.12' => '1.22', # pandoc 2.9 requires pandoc-types 1.22 + '2.11' => '1.22', # pandoc 2.9 requires pandoc-types 1.22 (Tables) + '2.10' => '1.21', # pandoc 2.9 requires pandoc-types 1.21 (Underline) + '2.9' => '1.20', # pandoc 2.9 requires pandoc-types 1.20 + '2.8' => '1.20', # pandoc 2.8 requires pandoc-types 1.20 + '2.7' => '1.17', # pandoc 2.7 requires pandoc-types 1.17 + '2.6' => '1.17', # pandoc 2.6 requires pandoc-types 1.17 + '2.5' => '1.17', # pandoc 2.5 requires pandoc-types 1.17 + '2.4' => '1.17', # pandoc 2.4 requires pandoc-types 1.17 + '2.3' => '1.17', # pandoc 2.3 requires pandoc-types 1.17 + '2.2' => '1.17', # pandoc 2.2 requires pandoc-types 1.17 + '2.1' => '1.17', # pandoc 2.1 requires pandoc-types 1.17 + '2.0' => '1.17', # pandoc 2.0 requires pandoc-types 1.17 '1.19' => '1.17', # pandoc 1.19 has api 1.17.0.4, compatible with api 1.17 '1.18' => '1.17', # pandoc 1.18 has api 1.17.0.4, compatible with api 1.17 '1.16' => '1.16', # pandoc 1.16 has api 1.16 --- a/t/document-pandoc-version.t +++ b/t/document-pandoc-version.t @@ -11,8 +11,12 @@ { pandoc_version => '1.17' } => [qw(1.16 1.16)], { pandoc_version => '1.18' } => [qw(1.17 1.18)], { pandoc_version => '1.18.1' } => [qw(1.17 1.18)], - { pandoc_version => 1.19 } => [qw(1.17 1.18)], - { pandoc_version => 1.99 } => [qw(1.17 1.18)], + { pandoc_version => '1.19' } => [qw(1.17 1.18)], + { pandoc_version => '2.0' } => [qw(1.17 1.18)], + { pandoc_version => '2.9' } => [qw(1.20 2.8)], + { pandoc_version => '2.10' } => [qw(1.21 2.10)], + { pandoc_version => '2.11' } => [qw(1.22 2.11)], + { pandoc_version => '2.16' } => [qw(1.22 2.11)], { pandoc_version => '1.0' } => undef, { api_version => 1.17 } => [qw(1.17 1.18)], ); --- a/t/document.t +++ b/t/document.t @@ -37,14 +37,14 @@ } ], ], - 1.17 => [ + 1.22 => [ 'meta, blocks' => [ doc_meta, doc_blocks, ], 'meta, blocks, api_version =>' => [ doc_meta, doc_blocks, - api_version => '1.17', + api_version => '1.22', ], '{ meta =>, blocks => }' => [ { meta => doc_meta, blocks => doc_blocks } @@ -52,14 +52,14 @@ '{ meta =>, blocks =>, pandoc-api-version => }' => [ { meta => doc_meta, blocks => doc_blocks, - 'pandoc-api-version' => [ 1, 17 ], + 'pandoc-api-version' => [ 1, 22 ], } ], ], ); my %json = ( - '1.17' => '{"blocks":[{"c":[1,["",[],[]],[{"c":"Hej","t":"Str"},{"c":[],"t":"Space"},{"c":"V\u00e4rlden!","t":"Str"}]],"t":"Header"},{"c":[{"c":"Hur","t":"Str"},{"c":[],"t":"Space"},{"c":"m\u00e5r","t":"Str"},{"c":[],"t":"Space"},{"c":"du","t":"Str"},{"c":[],"t":"Space"},{"c":"idag?","t":"Str"}],"t":"Para"}],"meta":{"title":{"c":[{"c":[{"c":"A","t":"Str"},{"c":[],"t":"SoftBreak"},{"c":"message","t":"Str"}],"t":"Plain"}],"t":"MetaInlines"}},"pandoc-api-version":[1,17]}', + '1.22' => '{"blocks":[{"c":[1,["",[],[]],[{"c":"Hej","t":"Str"},{"c":[],"t":"Space"},{"c":"V\u00e4rlden!","t":"Str"}]],"t":"Header"},{"c":[{"c":"Hur","t":"Str"},{"c":[],"t":"Space"},{"c":"m\u00e5r","t":"Str"},{"c":[],"t":"Space"},{"c":"du","t":"Str"},{"c":[],"t":"Space"},{"c":"idag?","t":"Str"}],"t":"Para"}],"meta":{"title":{"c":[{"c":[{"c":"A","t":"Str"},{"c":[],"t":"SoftBreak"},{"c":"message","t":"Str"}],"t":"Plain"}],"t":"MetaInlines"}},"pandoc-api-version":[1,22]}', '1.16' => '[{"unMeta":{"title":{"c":[{"c":[{"c":"A","t":"Str"},{"c":[],"t":"SoftBreak"},{"c":"message","t":"Str"}],"t":"Plain"}],"t":"MetaInlines"}}},[{"c":[1,["",[],[]],[{"c":"Hej","t":"Str"},{"c":[],"t":"Space"},{"c":"V\u00e4rlden!","t":"Str"}]],"t":"Header"},{"c":[{"c":"Hur","t":"Str"},{"c":[],"t":"Space"},{"c":"m\u00e5r","t":"Str"},{"c":[],"t":"Space"},{"c":"du","t":"Str"},{"c":[],"t":"Space"},{"c":"idag?","t":"Str"}],"t":"Para"}]]', '1.12.3' => '[{"unMeta":{"title":{"c":[{"c":[{"c":"A","t":"Str"},{"c":[],"t":"Space"},{"c":"message","t":"Str"}],"t":"Plain"}],"t":"MetaInlines"}}},[{"c":[1,["",[],[]],[{"c":"Hej","t":"Str"},{"c":[],"t":"Space"},{"c":"V\u00e4rlden!","t":"Str"}]],"t":"Header"},{"c":[{"c":"Hur","t":"Str"},{"c":[],"t":"Space"},{"c":"m\u00e5r","t":"Str"},{"c":[],"t":"Space"},{"c":"du","t":"Str"},{"c":[],"t":"Space"},{"c":"idag?","t":"Str"}],"t":"Para"}]]', ); @@ -80,7 +80,7 @@ }; } -foreach my $api_version ( qw[ 1.16 1.17 ] ) { +foreach my $api_version ( qw[ 1.16 1.22 ] ) { subtest $api_version => sub { my $expect = pandoc_json $json{$api_version}; is $expect->api_version, $api_version, 'api_version'; --- a/t/pandoc-version.t +++ b/t/pandoc-version.t @@ -13,7 +13,7 @@ { local $Pandoc::Elements::PANDOC_VERSION = undef; - is pandoc_version(), '1.19', 'maximum supported version'; + is pandoc_version(), '2.16', 'maximum supported version (default)'; } is pandoc_version(), '1.3', 'localize PANDOC_VERSION';