Add support for the @csgen.span element
This commit is contained in:
parent
4db018f5bc
commit
37487956fd
7
core.php
7
core.php
|
@ -130,6 +130,7 @@ function convertMarkdownToHTML($contents) {
|
||||||
'/.*@csgen\.allowComments.*=.*"(.*)(");/',
|
'/.*@csgen\.allowComments.*=.*"(.*)(");/',
|
||||||
'/.*@csgen\.displayTitle.*=.*"(.*)(");/',
|
'/.*@csgen\.displayTitle.*=.*"(.*)(");/',
|
||||||
'/.*@csgen\.displayDate.*=.*"(.*)(");/',
|
'/.*@csgen\.displayDate.*=.*"(.*)(");/',
|
||||||
|
'/.*@csgen\.span.*<STYLE.*,.*TEXT>\(.*"(.*)".*, "(.*)"\);/',
|
||||||
);
|
);
|
||||||
|
|
||||||
$out = $parser->transform($contents);
|
$out = $parser->transform($contents);
|
||||||
|
@ -174,6 +175,12 @@ function convertMarkdownToHTML($contents) {
|
||||||
$ret->displayDate = preg_replace('/<.*?$/', '', $ret->displayDate);
|
$ret->displayDate = preg_replace('/<.*?$/', '', $ret->displayDate);
|
||||||
$out = removePrefix("@csgen\.displayDate", $out);
|
$out = removePrefix("@csgen\.displayDate", $out);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case '/.*@csgen\.span.*<STYLE.*,.*TEXT>\(.*"(.*)".*, "(.*)"\);/':
|
||||||
|
$style = $matches[1];
|
||||||
|
$text = $matches[2];
|
||||||
|
$out = removePrefix("@csgen\.span", $out);
|
||||||
|
$out = preg_replace("/$matches[0]/i", "<span style=\"$style\">$text</span>", $out);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue