[futaba] add greentext formatting

This commit is contained in:
discomrade 2024-02-23 11:30:51 +00:00 committed by Shish
parent 3ba8834c20
commit 751a8f61d2
2 changed files with 7 additions and 0 deletions

View file

@ -87,6 +87,10 @@ class CustomCommentListTheme extends CommentListTheme
} else {
$h_comment = $tfe->formatted;
}
$h_comment = preg_replace("/(^|>)(&gt;[^<\n]*)(<|\n|$)/", '${1}<span class=\'greentext\'>${2}</span>${3}', $h_comment);
// handles discrepency in comment page and homepage
$h_comment = str_replace("<br>", "", $h_comment);
$h_comment = str_replace("\n", "<br>", $h_comment);
$i_comment_id = $comment->comment_id;
$i_image_id = $comment->image_id;

View file

@ -160,3 +160,6 @@ TABLE.tag_list>TBODY>TR>TD:after {
.thumb {
margin: 16px;
}
.greentext {
color: green;
}