Skip to content

Commit a1c8b19

Browse files
committed
Update Text::Markup to v0.40; remove CommonMark
Text::Markup v0.40 replaces the old and poorly-featured Text::Markdown with Text::Markdown::Discount for Markdown parsing. The new module support code fences, definition lists, tables, and more -- more features than CommonMark. So require Text::Markup v0.40 and remove CommonMark. This will bring Markdown parsing and formatting up to par with GitHub and most modern Markdown implementations. While at it: * Test on Perl 5.40 and 5.42 * Update copyright year
1 parent 57b4cc2 commit a1c8b19

10 files changed

Lines changed: 12 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
os: [[🐧, ubuntu], [🍎, macos]] # [🪟, windows]
10-
perl: [ '5.38', '5.36', '5.34', '5.32', '5.30', '5.28', '5.26', '5.24', '5.22', '5.20', '5.18', '5.16', '5.14' ]
10+
perl: [ '5.42', '5.40', '5.38', '5.36', '5.34', '5.32', '5.30', '5.28', '5.26', '5.24', '5.22', '5.20', '5.18', '5.16', '5.14' ]
1111
name: 🧅 Perl ${{ matrix.perl }} on ${{ matrix.os[0] }} ${{ matrix.os[1] }}
1212
runs-on: ${{ matrix.os[1] }}-latest
1313
steps:
@@ -16,18 +16,6 @@ jobs:
1616
uses: shogo82148/actions-setup-perl@v1
1717
with: { perl-version: "${{ matrix.perl }}" }
1818

19-
- name: Brew CommonMark
20-
if: runner.os == 'macOS'
21-
run: |
22-
brew install cmark
23-
cpanm -v --notest --no-man-pages CommonMark --configure-args="INC=-I'$(brew --prefix)/include' LIBS=-L'$(brew --prefix)/lib -lcmark'"
24-
25-
- name: Apt CommonMark
26-
if: runner.os == 'Linux'
27-
run: |
28-
sudo apt-get install libcmark-dev
29-
cpanm -v --notest --no-man-pages CommonMark
30-
3119
- name: Install Dependencies
3220
run: cpanm -vn Module::Build && cpanm -vn --installdeps --with-recommends --with-develop .
3321
- name: Run Tests

Build.PL

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ my $build = $class->new(
4545
requires => {
4646
'Archive::Zip' => '1.30',
4747
'Cwd' => '3.33',
48-
'CommonMark' => '0.290000',
4948
'Data::Dump' => '1.17',
5049
'Digest::SHA1' => '2.13',
5150
'Email::MIME::Creator' => '1.905',
@@ -69,7 +68,7 @@ my $build = $class->new(
6968
'Plack::App::File' => 0,
7069
'Plack::Middleware::JSONP' => 0,
7170
'Plack::Builder' => 0,
72-
'Text::Markup' => '0.33',
71+
'Text::Markup' => '0.40',
7372
'URI::Template' => '0.16',
7473
'XML::LibXML' => '1.70',
7574
},

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Revision history for Perl extension PGXN::API
55
0.20.2 2024-03-14T23:04:19Z
66
- Fixed symlinks extracted from Zip files and permission errors when
77
re-indexing distributions.
8+
- Switched from CommonMark to Text::Markdown::Discount for parsing and
9+
formatting Markdown files (but not MultiMarkdown files). This allows
10+
code fences, tables and definition lists to work.
811

912
0.20.1 2024-02-15T22:18:14Z
1013
- Fixed a bug where a testing extension's version and abstract was not

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ PGXN-API requires Perl 5.14 and the following modules:
2222

2323
* Archive::Zip
2424
* Cwd
25-
* CommonMark
2625
* Data::Dump
2726
* Digest::SHA1
2827
* Email::MIME::Creator
@@ -52,7 +51,7 @@ PGXN-API requires Perl 5.14 and the following modules:
5251
Copyright and License
5352
---------------------
5453

55-
Copyright (c) 2011-2024 David E. Wheeler.
54+
Copyright (c) 2011-2025 David E. Wheeler.
5655

5756
This module is free software; you can redistribute it and/or modify it under
5857
the [PostgreSQL License](http://www.opensource.org/licenses/postgresql).

bin/pgxn_api_server

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ David E. Wheeler <david.wheeler@pgexperts.com>
233233
234234
=head1 Copyright and License
235235
236-
Copyright (c) 2011-2024 David E. Wheeler.
236+
Copyright (c) 2011-2025 David E. Wheeler.
237237
238238
This module is free software; you can redistribute it and/or modify it under
239239
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>.

bin/pgxn_api_sync

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ David E. Wheeler <david.wheeler@pgexperts.com>
8787
8888
=head1 Copyright and License
8989
90-
Copyright (c) 2011-2024 David E. Wheeler.
90+
Copyright (c) 2011-2025 David E. Wheeler.
9191
9292
This module is free software; you can redistribute it and/or modify it under
9393
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>.

lib/PGXN/API.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ David E. Wheeler <david.wheeler@pgexperts.com>
308308
309309
=head1 Copyright and License
310310
311-
Copyright (c) 2011-2024 David E. Wheeler.
311+
Copyright (c) 2011-2025 David E. Wheeler.
312312
313313
This module is free software; you can redistribute it and/or modify it under
314314
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>.

lib/PGXN/API/Indexer.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use File::Path qw(make_path);
99
use File::Copy::Recursive qw(fcopy dircopy);
1010
use File::Basename;
1111
use Text::Markup;
12-
use Text::Markup::CommonMark;
1312
use Text::Markup::None qr/te?xt/;
1413
use XML::LibXML;
1514
use List::Util qw(first);
@@ -1521,7 +1520,7 @@ David E. Wheeler <david.wheeler@pgexperts.com>
15211520
15221521
=head1 Copyright and License
15231522
1524-
Copyright (c) 2011-2024 David E. Wheeler.
1523+
Copyright (c) 2011-2025 David E. Wheeler.
15251524
15261525
This module is free software; you can redistribute it and/or modify it under
15271526
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>.

lib/PGXN/API/Router.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ David E. Wheeler <david.wheeler@pgexperts.com>
225225
226226
=head1 Copyright and License
227227
228-
Copyright (c) 2011-2024 David E. Wheeler.
228+
Copyright (c) 2011-2025 David E. Wheeler.
229229
230230
This module is free software; you can redistribute it and/or modify it under
231231
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>.

lib/PGXN/API/Sync.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ David E. Wheeler <david.wheeler@pgexperts.com>
395395
396396
=head1 Copyright and License
397397
398-
Copyright (c) 2011-2024 David E. Wheeler.
398+
Copyright (c) 2011-2025 David E. Wheeler.
399399
400400
This module is free software; you can redistribute it and/or modify it under
401401
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>.

0 commit comments

Comments
 (0)