8

When I typed [tag:*-faq] in the new stacks editor, it rendered as a tag (like ), but then when I posted my answer, the unrendered Markdown was displayed.

Further, the Markdown following the asterisk was also italic.

Screenshot showing Stacks editor Markdown: Screenshot showing Stacks editor Markdown

Screenshot showing Stacks editor rendered Markdown: Screenshot showing Stacks editor rendered Markdown

Screenshot showing how Markdown was rendered on Meta SO: Screenshot showing how Markdown was rendered on Meta SO

7
  • 1
    I think the hyphen is the only not latin char permitted in tags, closest post with rules I could find was this one. The FAQ index doesn't seem to have a link for the tag naming rules.
    – bad_coder
    Jun 4, 2022 at 6:18
  • I'd say you're probably correct. It makes sense to me that markdown would disallow asterisks in tag names. The trouble, for me anyway, was just the inconsistency. It resulted in me posting an incorrectly formatted answer.
    – Joundill
    Jun 4, 2022 at 6:21
  • I think what's happening is that the post gets sanitized after being submitted to not render as a tag because it contains an illegal character (I didn't check the CommonMark specification and I'm supposing it's an SE rule). If that's the case it seems that the Stack editor isn't aware of that specific post rule and just renders the tag as such in preview regardless of the characters the tags contains.
    – bad_coder
    Jun 4, 2022 at 6:24
  • 1
    The bug regarding "the Markdown following the asterisk was also italic" has been reported before: meta.stackexchange.com/a/360038/513150. See also: github.com/StackExchange/Stacks-Editor/issues/21
    – Justin
    Jun 4, 2022 at 6:52
  • 1
    @bad_coder I don't recall the list of characters permitted in tags, but, at a minimum, the "+` character is also permitted, as is shown for the c++-faq tag in the screenshots in this question. Latin characters. IIRC, one criteria is that the tag must begin with a Latin character.
    – Makyen
    Jun 4, 2022 at 15:56
  • I just tested [tag:\*-faq] using the CommonMark escape character and it also doesn't work in the post and breaks the tag in preview.
    – bad_coder
    Jun 5, 2022 at 3:09
  • 2
    Here's the full list of rules for tag names, pretty sure this is still current: Tag Name Rules
    – zcoop98
    Jun 6, 2022 at 15:53

1 Answer 1

5

I just checked and this is the way that the current editor (not the Stacks Editor) works in terms of rendering something like [tag:*-faq] in the preview and in the text rendered on the server. An asterisk is not a legal character in a tag name (it can be used in favorite/ignore lists, but not in saved tag names, as far as I can tell), so it is correct to not render this as a tag.

The issue, if any, is that the Stacks Editor should not be rendering this as a tag, as it is not a legal tag. This has been fixed, and should no longer be happening.

if there's asterisk
in a tag name; no render
like all other tags

1
  • Cheers Yaakov! Happy to see this one marked [tag:status-completed] :)
    – Joundill
    Jan 30, 2023 at 19:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .