diff options
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index 7ab7031e7..9df38138d 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -38,6 +38,8 @@ use Bugzilla::Flag; use Bugzilla::Hook; use Bugzilla::Install::Localconfig qw(read_localconfig); use Bugzilla::Install::Util qw(init_console include_languages); +use Bugzilla::Markdown::GFM; +use Bugzilla::Markdown::GFM::Parser; use Bugzilla::Memcached; use Bugzilla::Template; use Bugzilla::Token; @@ -865,6 +867,11 @@ sub check_rate_limit { } } +sub markdown_parser { + return request_cache->{markdown_parser} + ||= Bugzilla::Markdown::GFM::Parser->new( {extensions => [qw( autolink tagfilter table strikethrough)] } ); +} + # Private methods # Per-process cleanup. Note that this is a plain subroutine, not a method, @@ -1190,6 +1197,11 @@ of features, see C<OPTIONAL_MODULES> in C<Bugzilla::Install::Requirements>. Feeds the provided message into our centralised auditing system. +=item C<markdown_parser> + +Returns a L<Bugzilla::Markdown::GFM::Parser> with the default extensions +loaded (autolink, tagfilter, table, and strikethrough). + =back =head1 B<CACHING> |