summaryrefslogtreecommitdiff
path: root/lib/VNDB/BBCode.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-08-24 16:41:20 +0200
committerYorhel <git@yorhel.nl>2020-08-24 16:41:22 +0200
commita8a97a6a0bcb4ff36804b79280ba5c9263fe233b (patch)
tree4f20acfa90d79dcda6b66ac73f2c155dddca1b57 /lib/VNDB/BBCode.pm
parentdda6647d207ea26800c5dbf3b326c88eccaa2c66 (diff)
reviews: Get rid of summary field & split mini/full reviews
Much to my disappointment, people don't write proper summaries and, as such, summaries are not useful to be considered a "short review" on their own right. This necessitates splitting the reviews onto different pages.
Diffstat (limited to 'lib/VNDB/BBCode.pm')
-rw-r--r--lib/VNDB/BBCode.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/VNDB/BBCode.pm b/lib/VNDB/BBCode.pm
index f6ab93d9..fe3a43d7 100644
--- a/lib/VNDB/BBCode.pm
+++ b/lib/VNDB/BBCode.pm
@@ -179,7 +179,7 @@ FINAL:
# 2: Just output 'hidden by spoiler setting' message
# 3: Just output the spoilers, unmarked
sub bb2html {
- my($input, $maxlength, $charspoil) = @_;
+ my($input, $maxlength, $charspoil, $nobreak) = @_;
my $incode = 0;
my $rmnewline = 0;
@@ -202,8 +202,8 @@ sub bb2html {
s/&/&amp;/g;
s/>/&gt;/g;
s/</&lt;/g;
- s/\n/<br>/g if !$maxlength;
- s/\n/ /g if $maxlength;
+ s/\n/<br>/g if !$nobreak;
+ s/\n/ /g if $nobreak;
$_;
};
@@ -233,18 +233,18 @@ sub bb2html {
$charspoil == 2 ? '-->' : '';
} elsif($tag eq 'quote_start') {
- $ret .= '<div class="quote">' if !$maxlength;
+ $ret .= '<div class="quote">' if !$nobreak;
$rmnewline = 1;
} elsif($tag eq 'quote_end') {
- $ret .= '</div>' if !$maxlength;
+ $ret .= '</div>' if !$nobreak;
$rmnewline = 1;
} elsif($tag eq 'code_start') {
- $ret .= '<pre>' if !$maxlength;
+ $ret .= '<pre>' if !$nobreak;
$rmnewline = 1;
$incode = 1;
} elsif($tag eq 'code_end') {
- $ret .= '</pre>' if !$maxlength;
+ $ret .= '</pre>' if !$nobreak;
$rmnewline = 1;
$incode = 0;