diff options
author | Yorhel <git@yorhel.nl> | 2020-08-24 16:41:20 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-08-24 16:41:22 +0200 |
commit | a8a97a6a0bcb4ff36804b79280ba5c9263fe233b (patch) | |
tree | 4f20acfa90d79dcda6b66ac73f2c155dddca1b57 /lib/VNDB | |
parent | dda6647d207ea26800c5dbf3b326c88eccaa2c66 (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')
-rw-r--r-- | lib/VNDB/BBCode.pm | 14 | ||||
-rw-r--r-- | lib/VNDB/Handler/Misc.pm | 2 |
2 files changed, 8 insertions, 8 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/&/&/g; s/>/>/g; s/</</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; diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm index c316999d..b4827da2 100644 --- a/lib/VNDB/Handler/Misc.pm +++ b/lib/VNDB/Handler/Misc.pm @@ -105,7 +105,7 @@ sub homepage { a href => "/$_->{id}", $_->{title}; end; p; - lit bb2html $post->{msg}, 150; + lit bb2html $post->{msg}, 150, 0, 1; end; } end 'td'; |