Skip to content

Commit

Permalink
FENCEDCODEを有効にする
Browse files Browse the repository at this point in the history
  • Loading branch information
kfly8 committed May 15, 2024
1 parent 558d5b6 commit 8a76fd3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/PJP/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ sub slurp {
sub markdown_to_html {
my ($markdown) = @_;

my $html = Text::Markdown::Discount::markdown($markdown);
state $flag = Text::Markdown::Discount::MKD_NOHEADER
| Text::Markdown::Discount::MKD_NOPANTS
| 0x02000000 # MKD_FENCEDCODE
;

my $html = Text::Markdown::Discount::markdown($markdown, $flag);

# perldoc.jp 用の加工
$html =~ s{^.*<(?:body)[^>]*>}{}si;
Expand Down

0 comments on commit 8a76fd3

Please sign in to comment.