Skip to content

Commit

Permalink
Markdown式リンクをPukiwiki式リンクに変換
Browse files Browse the repository at this point in the history
45行目に
$line = preg_replace('/\[(.*?)\]\((https?\:\/\/[\-_\.\!\~\*\'\(\)a-zA-Z0-9\;\/\?\:\@\&\=\+\$\,\%\#]+)( )?(\".*\")?\)/', "[[$1>$2]]", $line);
を追記
  • Loading branch information
m0370 committed Dec 30, 2021
1 parent 6878389 commit c01b871
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/convert_html.php
Expand Up @@ -42,6 +42,7 @@ function convert_html($lines)
$line = "plugin ${plugin} failed.";
}
} else {
$line = preg_replace('/\[(.*?)\]\((https?\:\/\/[\-_\.\!\~\*\'\(\)a-zA-Z0-9\;\/\?\:\@\&\=\+\$\,\%\#]+)( )?(\".*\")?\)/', "[[$1>$2]]", $line); // Markdown式リンクをPukiwiki式リンクに変換
$line = make_link($line);
// ファイル読み込んだ場合に改行コードが末尾に付いていることがあるので削除
// 空白は削除しちゃだめなのでrtrim()は使ってはいけない
Expand Down

0 comments on commit c01b871

Please sign in to comment.