Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Post History

66%
+2 −0
Q&A Syntax highlighting comments break the unsupported tags warning message

Based on the comment discussion, I can see no reason to consider support for syntax highlight hinting via HTML comments. "Code fences" have a built-in syntax highlighting suggestion and are all aro...

posted 23d ago by Karl Knechtel‭

Answer
#1: Initial revision by user avatar Karl Knechtel‭ · 2024-04-25T06:32:23Z (23 days ago)
Based on the comment discussion, I can see no reason to consider support for syntax highlight hinting via HTML comments. "Code fences" have a built-in syntax highlighting suggestion and are all around quite practical and standard: such "fenced code blocks" [are part of the CommonMark standard](https://spec.commonmark.org/0.31.2/#indented-code-blocks), and overall easier to work with than "indented code blocks". They're also, for example, the [recommended way to do it](https://discuss.python.org/t/about-the-python-help-category/42) on the Python Discourse forum.

However, the warning about HTML comments definitely should be suppressed, IMO. First off, there's no good reason to treat comments as something that need to be "filtered out". For the most "important" Q&A - ones that are expected to be viewed the most often in the long run, or used to close many duplicates - they can offer important information for future editors about why a given detail was formatted in a specific way. (While some aspects of this might be better discussed in comments, surely this isn't universal.)

Second, it doesn't make sense to give the user a "warning" about HTML comments being stripped from the resulting post, because *that would be expected anyway* - the purpose of a comment is exactly to avoid actually changing anything while providing metadata. It's especially user-unfriendly to see `<undefined>` in the warning message - it's confusing, since the user didn't actually write a tag with that name; and it generally comes across as though the system encountered some problem while trying to format the message.

On the other hand, it probably doesn't matter if the system *actually removes* the HTML comments from the final rendered HTML. Just as long as it isn't treated like a cryptic and spurious error.