Banner doesn't show when 'remove tag hyphen' is enabled

Saw this on two instances: the banner doesn’t show when a tag uses hyphens and remove tag hyphen is enabled.

2 Likes

The remove tag hyphen is nice, but can you also add an option for underscores?

This probably does the trick:
https://github.com/kees-closed/discourse-tag-banners/commit/e924faeb8d6a09a8f4ed436ab5a3f19c00731649

But can’t test it out yet, because the same bug is present as with the hyphen option. When enabled, the tag banner disappears.

1 Like

Is anyone else having an issue with remove tag hyphen? For me the tag banner disappears when I turn this option on.

2 Likes

Once the plugin works again, I’ll submit a PR for the underscore replacement. But I’m also considering to add an option to capitalize the first letter of a tag. So e.g. #open_source would become “Open source” in the banner. I could also add another option to capitalize every word, e.g. “Open Source”. But before doing that I need a working base to be able to test these changes. Hopefully it can be fixed soon.

1 Like

Thanks for your patience everyone! I’ve fixed the issue with hyphen removal, and also added the option to remove underscores.

https://github.com/discourse/discourse-tag-banners/commit/dea20a2a2d59520f7a5b1062e9e699291e6ac683

5 Likes