summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-09-02 13:46:45 +0200
committerYorhel <git@yorhel.nl>2020-09-02 13:46:47 +0200
commit3d53b0d6b8d9aa8e52c96c3ed6ac9f7dc1d660f4 (patch)
tree4d44b873b7e5d5483484cbd9cb6f0940723957c6 /lib/VNDB/Handler
parentd019f3a2bc73e9513ec6489ac742faa0f8f560dc (diff)
BBCode: Consolidate bb2html & bb2text + only convert ids in thread titles
Fixing bb2html to only convert ids would complicate options a lot, adding a new formatting function to only convert ids would make sense, but then all formatting functions kind of look alike, so I figured a single bb_format() to support all use cases may be a better approach. Trigger for this was that people do (understandably) put [spoiler] in thread titles, and that should not be interpreted as the spoiler tag.
Diffstat (limited to 'lib/VNDB/Handler')
-rw-r--r--lib/VNDB/Handler/Misc.pm2
-rw-r--r--lib/VNDB/Handler/Tags.pm2
-rw-r--r--lib/VNDB/Handler/Traits.pm2
-rw-r--r--lib/VNDB/Handler/VNPage.pm2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 906c7c78..b7e1620d 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, 0, 1;
+ lit bb_format $post->{msg}, maxlength => 150, inline => 1;
end;
}
end 'td';
diff --git a/lib/VNDB/Handler/Tags.pm b/lib/VNDB/Handler/Tags.pm
index c44529cf..55bf99db 100644
--- a/lib/VNDB/Handler/Tags.pm
+++ b/lib/VNDB/Handler/Tags.pm
@@ -83,7 +83,7 @@ sub tagpage {
if($t->{description}) {
p class => 'description';
- lit bb2html $t->{description};
+ lit bb_format $t->{description};
end;
}
if(!$t->{applicable} || !$t->{searchable}) {
diff --git a/lib/VNDB/Handler/Traits.pm b/lib/VNDB/Handler/Traits.pm
index f9802cff..e69b673e 100644
--- a/lib/VNDB/Handler/Traits.pm
+++ b/lib/VNDB/Handler/Traits.pm
@@ -64,7 +64,7 @@ sub traitpage {
if($t->{description}) {
p class => 'description';
- lit bb2html $t->{description};
+ lit bb_format $t->{description};
end;
}
if(!$t->{applicable} || !$t->{searchable}) {
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm
index 1e11aa7b..1198a421 100644
--- a/lib/VNDB/Handler/VNPage.pm
+++ b/lib/VNDB/Handler/VNPage.pm
@@ -149,7 +149,7 @@ my @rel_cols = (
default => 1,
what => 'extended',
has_data => sub { !!$_[0]{notes} },
- draw => sub { lit bb2html $_[0]{notes} },
+ draw => sub { lit bb_format $_[0]{notes} },
}
);