diff options
author | Yorhel <git@yorhel.nl> | 2018-02-08 16:06:17 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2018-02-08 16:12:07 +0100 |
commit | 93b79ef9ebafcfccd0d239ffd06e2b547e209e3d (patch) | |
tree | 98d96f024d00bf318b16243518e53c2977136202 /lib/VNDB/BBCode.pm | |
parent | 3f3a4d9810bb2483a89442b85d438639f26ecb7e (diff) |
Store d+ pages in the DB as versioned entries + use markdown
This touches a bunch of things:
- Adds a new first-class database entry type
- Removes the d+.+.+ BBCode link syntax, adds a new d+#+ and d+#+.+
link syntax (references have been updated where possible)
- Adds a new dependency on Text::MultiMarkdown
Diffstat (limited to 'lib/VNDB/BBCode.pm')
-rw-r--r-- | lib/VNDB/BBCode.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNDB/BBCode.pm b/lib/VNDB/BBCode.pm index d2f3135d..7ddfcd1b 100644 --- a/lib/VNDB/BBCode.pm +++ b/lib/VNDB/BBCode.pm @@ -14,7 +14,7 @@ our @EXPORT = qw/bb2html bb2text/; # [url=..] [/url] # [raw] .. [/raw] # link: http://../ -# dblink: v#, v#.#, d#.#.# +# dblink: v+, v+.+, d+#+, d+#+.+ # # Permitted nesting of formatting codes: # spoiler -> url, raw, link, dblink @@ -112,9 +112,9 @@ sub parse { while($raw =~ m{(?: \[ \/? (?i: spoiler|quote|code|url|raw ) [^\s\]]* \] | # tag - d[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]* | # d#.#.# - [tdvprcs][1-9][0-9]*\.[1-9][0-9]* | # v#.# - [tdvprcsugi][1-9][0-9]* | # v# + d[1-9][0-9]* \# [1-9][0-9]* (?: \.[1-9][0-9]* )? | # d+#+[.+] + [tdvprcs][1-9][0-9]*\.[1-9][0-9]* | # v+.+ + [tdvprcsugi][1-9][0-9]* | # v+ (?:https?|ftp)://[^><"\n\s\]\[]+[\d\w=/-] # link )}xg) { my $token = $&; |