This is a first shot on implementing category hierarchies, as discussed in #1520. Hierarchies must be explicitly enabled via CATEGORY_ALLOW_HIERARCHIES = True in conf.py. Then / in a category name is used to specify a category path, and \ is used for escaping / and \.
CATEGORY_OUTPUT_FLAT_HIERARCHY can be used to switch between using the full category path to determine the category's slug (when set to False, which is the default), or to just use the subcategory name for the slug (when set to True).
That's because tag_index.tmpl lets index.tmpl do all the work. Usually subcategories is not set, so nothing will happen.
It would be better to move this into tagindex.tmpl, but I was too lazy for that during the first try.
Good point. I am tempted to say that if someone uses a///b as a tag, he deserves the uncertainty ;-)
I just hate how all the clashing slashes look. Maybe get a 3rd opinion? Otherwise, since you are doing the code, you win.
Maybe someone likes to have Unix paths in her/his categories, like /dev/null. Having that as a subcategory would be impossible if we parse left-to-right. I really don't like the idea of not being able to specify certain (sub-)category names just because we wanted to make things a little simpler.
Well, most people use neither / nor \ in category names, so essentially nobody will notice this anyway. And the few who really want to use at least one of them, might actually be happy to use what they wanted to use :)
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.