summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Misc/BBCode.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNWeb/Misc/BBCode.pm')
-rw-r--r--lib/VNWeb/Misc/BBCode.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/VNWeb/Misc/BBCode.pm b/lib/VNWeb/Misc/BBCode.pm
index 5d6f2e0b..ddc744b2 100644
--- a/lib/VNWeb/Misc/BBCode.pm
+++ b/lib/VNWeb/Misc/BBCode.pm
@@ -3,9 +3,15 @@ package VNWeb::Misc::BBCode;
use VNWeb::Prelude;
elm_api BBCode => undef, {
- content => { required => 0, default => '' }
+ content => { default => '' }
}, sub {
- elm_Content bb2html bb_subst_links shift->{content};
+ elm_Content bb_format bb_subst_links shift->{content};
+};
+
+js_api BBCode => {
+ content => { default => '' }
+}, sub {
+ +{ html => bb_format bb_subst_links shift->{content} };
};
1;