From 751a8f61d2115564ec3420664df01f5b6b2013e8 Mon Sep 17 00:00:00 2001 From: discomrade <83621080+discomrade@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:30:51 +0000 Subject: [PATCH] [futaba] add greentext formatting --- themes/futaba/comment.theme.php | 4 ++++ themes/futaba/style.css | 3 +++ 2 files changed, 7 insertions(+) diff --git a/themes/futaba/comment.theme.php b/themes/futaba/comment.theme.php index 3a73a56f..dec2abd0 100644 --- a/themes/futaba/comment.theme.php +++ b/themes/futaba/comment.theme.php @@ -87,6 +87,10 @@ class CustomCommentListTheme extends CommentListTheme } else { $h_comment = $tfe->formatted; } + $h_comment = preg_replace("/(^|>)(>[^<\n]*)(<|\n|$)/", '${1}${2}${3}', $h_comment); + // handles discrepency in comment page and homepage + $h_comment = str_replace("
", "", $h_comment); + $h_comment = str_replace("\n", "
", $h_comment); $i_comment_id = $comment->comment_id; $i_image_id = $comment->image_id; diff --git a/themes/futaba/style.css b/themes/futaba/style.css index f75b6a21..19f127e2 100644 --- a/themes/futaba/style.css +++ b/themes/futaba/style.css @@ -159,4 +159,7 @@ TABLE.tag_list>TBODY>TR>TD:after { } .thumb { margin: 16px; +} +.greentext { + color: green; } \ No newline at end of file