I wrote a little addition to the display_tags macro in shared-episode-summary.tpl.html which cleans and splits the database tags field (with a regex) then runs a loop on the result, generating links. It works in my tests but this database field really needs to be parsed with a CSV-aware parser since there's some weird and wacky stuff in there. Plus my basic "parser" would not manage embedded commas, and I know there are some in there!
I'd prefer to create a more robust solution.
I have a moderately usable solution.
I wrote a little addition to the `display_tags` macro in `shared-episode-summary.tpl.html` which cleans and splits the database `tags` field (with a regex) then runs a loop on the result, generating links. It works in my tests but this database field really needs to be parsed with a CSV-aware parser since there's some weird and wacky stuff in there. Plus my basic "parser" would not manage embedded commas, and I know there are some in there!
I'd prefer to create a more robust solution.
Given that anchor ids are limited in what they can contain (start with a letter, alphanumerics and underscores, etc) we need to generate them with an algorithm.
The ids can be generated with a Perl function in the site-generator, which is called when creating an episode page, or list of episode summaries. A Perl function callable in TT² might be more efficient than a TT² macro.
The id generation function also needs to be called when building the tags page
There's a fair bit to do still:
- Given that anchor ids are limited in what they can contain (start with a letter, alphanumerics and underscores, etc) we need to generate them with an algorithm.
- The ids can be generated with a Perl function in the `site-generator`, which is called when creating an episode page, or list of episode summaries. A Perl function callable in TT² might be more efficient than a TT² macro.
- The id generation function also needs to be called when building the tags page
The "more robust" solution was added in the last few days. It consists of a TT² vmethod called csv_parse which uses the module Text::CSV_XS to take the CSV tags from the database, split them, and use the resulting list to generate a series of links.
This is not the end of the story however, we need a better anchor id generator, as noted above.
The "more robust" solution was added in the last few days. It consists of a TT² `vmethod` called `csv_parse` which uses the module `Text::CSV_XS` to take the CSV tags from the database, split them, and use the resulting list to generate a series of links.
This is not the end of the story however, we need a better anchor id generator, as noted above.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
should be
I have a moderately usable solution.
I wrote a little addition to the
display_tagsmacro inshared-episode-summary.tpl.htmlwhich cleans and splits the databasetagsfield (with a regex) then runs a loop on the result, generating links. It works in my tests but this database field really needs to be parsed with a CSV-aware parser since there's some weird and wacky stuff in there. Plus my basic "parser" would not manage embedded commas, and I know there are some in there!I'd prefer to create a more robust solution.
There's a fair bit to do still:
site-generator, which is called when creating an episode page, or list of episode summaries. A Perl function callable in TT² might be more efficient than a TT² macro.The "more robust" solution was added in the last few days. It consists of a TT²
vmethodcalledcsv_parsewhich uses the moduleText::CSV_XSto take the CSV tags from the database, split them, and use the resulting list to generate a series of links.This is not the end of the story however, we need a better anchor id generator, as noted above.
This has been implemented and merged into main