Parse db tag field with CSV parser module
The CSV parser module is being used in another template. Make tag field parsing consistent.
This commit is contained in:
parent
31a5994731
commit
70d5983ede
@ -5,12 +5,10 @@
|
||||
$Template::Stash::PRIVATE = undef; # Allow . in tag
|
||||
<!--% END %-->
|
||||
<!--% uniq_tag_count = 0 %-->
|
||||
<!--% comma_re = '(?x)(?:^|,\s*)(?:"((?>[^"]*)(?:""[^"]*)*)"|([^",]*))'; %-->
|
||||
<!--# 'Moka5,interview, "computer science"' -->
|
||||
<!--% FOREACH episode IN DBI.query(query_tags);
|
||||
ep_id = episode.id;
|
||||
ep_tags = episode.tags;
|
||||
FOREACH tag_str IN ep_tags.split(comma_re);
|
||||
FOREACH tag_str IN ep_tags.csv_parse;
|
||||
NEXT UNLESS tag_str;
|
||||
NEXT IF tag_str == '';
|
||||
tag = tag_str.lower;
|
||||
|
Reference in New Issue
Block a user