Refactor markup and creole_wiki

This commit is contained in:
Milan
2020-03-01 22:48:01 +01:00
parent b9f0870955
commit 9860eee1e2
2 changed files with 18 additions and 10 deletions

View File

@@ -48,6 +48,7 @@ sub html_to_creole($) {
$s =~ s/<\/?option.*?//gi;
$s =~ s/<\/?input.*?>//gi;
$s =~ s/<\/?script.*?>//gi;
#remove line breaks
$s =~ s/[\r\n]+/ /gi;
@@ -78,7 +79,7 @@ sub html_to_creole($) {
$s =~ s/(\[\[[^\]\n]*?)\n([^\]]*?\]\])/$1$2/g;
$s =~ s/(\[\[[^\]\n]*?)\n([^\]]*?\]\])/$1$2/g;
$s =~ s/(\[\[[^\]\n]*?)\n([^\]]*?\]\])/$1$2/g;
$s =~ s/[\s]+/ /gi;
#line elements, increase head line level to avoid breaking single = chars