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

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

When an HTML tag is used in a post but is not supported by Codidact, a warning message is displayed listing the unsupported tags. However, syntax highlighting hints in the form of HTML comments suc...

1 answer  ·  posted 7mo ago by trichoplax‭  ·  edited 3mo ago by Monica Cellio‭

#6: Post edited by user avatar Monica Cellio‭ · 2024-08-25T19:14:48Z (3 months ago)
comments no longer produce this warning; did not make changes to syntax highlighting
#5: Post edited by user avatar Monica Cellio‭ · 2024-08-22T19:42:25Z (3 months ago)
should be fixed in the next deploy (https://github.com/codidact/qpixel/pull/1377)
#4: Post edited by user avatar trichoplax‭ · 2024-04-22T18:16:45Z (7 months ago)
Fix an overlooked instance of Meta Codidact instead of Codidact Meta
  • When an HTML tag is used in a post but is not supported by Codidact, a warning message is displayed listing the unsupported tags. However, [syntax highlighting] hints in the form of HTML comments such as `<!-- language-all:lang-python -->` are listed as `<undefined>` in the warning message:
  • ![Unsupported HTML message, listing undefined instead of a tag name](https://meta.codidact.com/uploads/bkgiutcooexiohfrjmb50tvtkrlm)
  • This makes it difficult for people to guess which part of their draft is the cause of the problem.
  • ## Should we exclude HTML comments from the list?
  • HTML comments (whether related to syntax highlighting or not) are not expected to be visible in the final post. Should anything that starts in `<!--` and ends in `-->` be excluded from the list shown in the warning message?
  • ## Do language hints affect syntax highlighting?
  • As far as I can tell, these HTML comment syntax highlighting hints such as `<!-- language-all:lang-python -->` have no effect on Codidact.
  • On Codidact, the language to use for syntax highlighting can instead be defined by surrounding a code block in triple backticks and putting the language name immediately after the opening backticks, like this:
  • ````text
  • ```python
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • ````
  • This is then rendered as coloured text on communities that support syntax highlighting such as Code Golf and Software Development. If testing this by editing, note that syntax highlighting is not currently activated here on Codidact Meta.
  • ## Should we also support HTML comment hints?
  • If anyone wants Codidact to support these HTML comment hints for syntax highlighting, I recommend raising a separate feature request here on Meta Codidact.
  • ## Should we link to guidance on using backticks?
  • Users accustomed to Stack Exchange may expect HTML comment hints to work for syntax highlighting. Should we have a separate warning message that appears when HTML comments are present and links to a guide to using backticks for syntax highlighting, so that people are not surprised that their HTML comment approach is not working?
  • This might be particularly useful because Codidact will guess the intended language when no language is specified using backticks, resulting in the appearance that HTML comments sometimes work (even though in reality this is just coincidence when Codidact guesses the same language).
  • [syntax highlighting]: https://en.wikipedia.org/wiki/Syntax_highlighting "Displaying code in colour to clarify its meaning"
  • When an HTML tag is used in a post but is not supported by Codidact, a warning message is displayed listing the unsupported tags. However, [syntax highlighting] hints in the form of HTML comments such as `<!-- language-all:lang-python -->` are listed as `<undefined>` in the warning message:
  • ![Unsupported HTML message, listing undefined instead of a tag name](https://meta.codidact.com/uploads/bkgiutcooexiohfrjmb50tvtkrlm)
  • This makes it difficult for people to guess which part of their draft is the cause of the problem.
  • ## Should we exclude HTML comments from the list?
  • HTML comments (whether related to syntax highlighting or not) are not expected to be visible in the final post. Should anything that starts in `<!--` and ends in `-->` be excluded from the list shown in the warning message?
  • ## Do language hints affect syntax highlighting?
  • As far as I can tell, these HTML comment syntax highlighting hints such as `<!-- language-all:lang-python -->` have no effect on Codidact.
  • On Codidact, the language to use for syntax highlighting can instead be defined by surrounding a code block in triple backticks and putting the language name immediately after the opening backticks, like this:
  • ````text
  • ```python
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • ````
  • This is then rendered as coloured text on communities that support syntax highlighting such as Code Golf and Software Development. If testing this by editing, note that syntax highlighting is not currently activated here on Codidact Meta.
  • ## Should we also support HTML comment hints?
  • If anyone wants Codidact to support these HTML comment hints for syntax highlighting, I recommend raising a separate feature request here on Codidact Meta.
  • ## Should we link to guidance on using backticks?
  • Users accustomed to Stack Exchange may expect HTML comment hints to work for syntax highlighting. Should we have a separate warning message that appears when HTML comments are present and links to a guide to using backticks for syntax highlighting, so that people are not surprised that their HTML comment approach is not working?
  • This might be particularly useful because Codidact will guess the intended language when no language is specified using backticks, resulting in the appearance that HTML comments sometimes work (even though in reality this is just coincidence when Codidact guesses the same language).
  • [syntax highlighting]: https://en.wikipedia.org/wiki/Syntax_highlighting "Displaying code in colour to clarify its meaning"
#3: Post edited by user avatar trichoplax‭ · 2024-04-22T18:15:49Z (7 months ago)
Fix incorrect naming of Codidact Meta
  • When an HTML tag is used in a post but is not supported by Codidact, a warning message is displayed listing the unsupported tags. However, [syntax highlighting] hints in the form of HTML comments such as `<!-- language-all:lang-python -->` are listed as `<undefined>` in the warning message:
  • ![Unsupported HTML message, listing undefined instead of a tag name](https://meta.codidact.com/uploads/bkgiutcooexiohfrjmb50tvtkrlm)
  • This makes it difficult for people to guess which part of their draft is the cause of the problem.
  • ## Should we exclude HTML comments from the list?
  • HTML comments (whether related to syntax highlighting or not) are not expected to be visible in the final post. Should anything that starts in `<!--` and ends in `-->` be excluded from the list shown in the warning message?
  • ## Do language hints affect syntax highlighting?
  • As far as I can tell, these HTML comment syntax highlighting hints such as `<!-- language-all:lang-python -->` have no effect on Codidact.
  • On Codidact, the language to use for syntax highlighting can instead be defined by surrounding a code block in triple backticks and putting the language name immediately after the opening backticks, like this:
  • ````text
  • ```python
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • ````
  • This is then rendered as coloured text on communities that support syntax highlighting such as Code Golf and Software Development. If testing this by editing, note that syntax highlighting is not currently activated here on Meta Codidact.
  • ## Should we also support HTML comment hints?
  • If anyone wants Codidact to support these HTML comment hints for syntax highlighting, I recommend raising a separate feature request here on Meta Codidact.
  • ## Should we link to guidance on using backticks?
  • Users accustomed to Stack Exchange may expect HTML comment hints to work for syntax highlighting. Should we have a separate warning message that appears when HTML comments are present and links to a guide to using backticks for syntax highlighting, so that people are not surprised that their HTML comment approach is not working?
  • This might be particularly useful because Codidact will guess the intended language when no language is specified using backticks, resulting in the appearance that HTML comments sometimes work (even though in reality this is just coincidence when Codidact guesses the same language).
  • [syntax highlighting]: https://en.wikipedia.org/wiki/Syntax_highlighting "Displaying code in colour to clarify its meaning"
  • When an HTML tag is used in a post but is not supported by Codidact, a warning message is displayed listing the unsupported tags. However, [syntax highlighting] hints in the form of HTML comments such as `<!-- language-all:lang-python -->` are listed as `<undefined>` in the warning message:
  • ![Unsupported HTML message, listing undefined instead of a tag name](https://meta.codidact.com/uploads/bkgiutcooexiohfrjmb50tvtkrlm)
  • This makes it difficult for people to guess which part of their draft is the cause of the problem.
  • ## Should we exclude HTML comments from the list?
  • HTML comments (whether related to syntax highlighting or not) are not expected to be visible in the final post. Should anything that starts in `<!--` and ends in `-->` be excluded from the list shown in the warning message?
  • ## Do language hints affect syntax highlighting?
  • As far as I can tell, these HTML comment syntax highlighting hints such as `<!-- language-all:lang-python -->` have no effect on Codidact.
  • On Codidact, the language to use for syntax highlighting can instead be defined by surrounding a code block in triple backticks and putting the language name immediately after the opening backticks, like this:
  • ````text
  • ```python
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • ````
  • This is then rendered as coloured text on communities that support syntax highlighting such as Code Golf and Software Development. If testing this by editing, note that syntax highlighting is not currently activated here on Codidact Meta.
  • ## Should we also support HTML comment hints?
  • If anyone wants Codidact to support these HTML comment hints for syntax highlighting, I recommend raising a separate feature request here on Meta Codidact.
  • ## Should we link to guidance on using backticks?
  • Users accustomed to Stack Exchange may expect HTML comment hints to work for syntax highlighting. Should we have a separate warning message that appears when HTML comments are present and links to a guide to using backticks for syntax highlighting, so that people are not surprised that their HTML comment approach is not working?
  • This might be particularly useful because Codidact will guess the intended language when no language is specified using backticks, resulting in the appearance that HTML comments sometimes work (even though in reality this is just coincidence when Codidact guesses the same language).
  • [syntax highlighting]: https://en.wikipedia.org/wiki/Syntax_highlighting "Displaying code in colour to clarify its meaning"
#2: Post edited by user avatar trichoplax‭ · 2024-04-22T18:14:38Z (7 months ago)
Reduce ambiguity
  • When an HTML tag is used in a post but is not supported by Codidact, a warning message is displayed listing the unsupported tags. However, [syntax highlighting] hints in the form of HTML comments such as `<!-- language-all:lang-python -->` are listed as `<undefined>` in the warning message:
  • ![Unsupported HTML message, listing undefined instead of a tag name](https://meta.codidact.com/uploads/bkgiutcooexiohfrjmb50tvtkrlm)
  • This makes it difficult for people to guess which part of their draft is the cause of the problem.
  • ## Should we exclude HTML comments from the list?
  • HTML comments (whether related to syntax highlighting or not) are not expected to be visible in the final post. Should anything that starts in `<!--` and ends in `-->` be excluded from the list shown in the warning message?
  • ## Do language hints affect syntax highlighting?
  • As far as I can tell, these HTML comment syntax highlighting hints like `<!-- language-all:lang-python -->` have no effect on Codidact.
  • On Codidact, the language to use for syntax highlighting can instead be defined by surrounding a code block in triple backticks and putting the language name immediately after the opening backticks, like this:
  • ````text
  • ```python
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • ````
  • This is then rendered as coloured text on communities that support syntax highlighting such as Code Golf and Software Development. If testing this by editing, note that syntax highlighting is not currently activated here on Meta Codidact.
  • ## Should we also support HTML comment hints?
  • If anyone wants Codidact to support these HTML comment hints for syntax highlighting, I recommend raising a separate feature request here on Meta Codidact.
  • ## Should we link to guidance on using backticks?
  • Users accustomed to Stack Exchange may expect HTML comment hints to work for syntax highlighting. Should we have a separate warning message that appears when HTML comments are present and links to a guide to using backticks for syntax highlighting, so that people are not surprised that their HTML comment approach is not working?
  • This might be particularly useful because Codidact will guess the intended language when no language is specified using backticks, resulting in the appearance that HTML comments sometimes work (even though in reality this is just coincidence when Codidact guesses the same language).
  • [syntax highlighting]: https://en.wikipedia.org/wiki/Syntax_highlighting "Displaying code in colour to clarify its meaning"
  • When an HTML tag is used in a post but is not supported by Codidact, a warning message is displayed listing the unsupported tags. However, [syntax highlighting] hints in the form of HTML comments such as `<!-- language-all:lang-python -->` are listed as `<undefined>` in the warning message:
  • ![Unsupported HTML message, listing undefined instead of a tag name](https://meta.codidact.com/uploads/bkgiutcooexiohfrjmb50tvtkrlm)
  • This makes it difficult for people to guess which part of their draft is the cause of the problem.
  • ## Should we exclude HTML comments from the list?
  • HTML comments (whether related to syntax highlighting or not) are not expected to be visible in the final post. Should anything that starts in `<!--` and ends in `-->` be excluded from the list shown in the warning message?
  • ## Do language hints affect syntax highlighting?
  • As far as I can tell, these HTML comment syntax highlighting hints such as `<!-- language-all:lang-python -->` have no effect on Codidact.
  • On Codidact, the language to use for syntax highlighting can instead be defined by surrounding a code block in triple backticks and putting the language name immediately after the opening backticks, like this:
  • ````text
  • ```python
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • ````
  • This is then rendered as coloured text on communities that support syntax highlighting such as Code Golf and Software Development. If testing this by editing, note that syntax highlighting is not currently activated here on Meta Codidact.
  • ## Should we also support HTML comment hints?
  • If anyone wants Codidact to support these HTML comment hints for syntax highlighting, I recommend raising a separate feature request here on Meta Codidact.
  • ## Should we link to guidance on using backticks?
  • Users accustomed to Stack Exchange may expect HTML comment hints to work for syntax highlighting. Should we have a separate warning message that appears when HTML comments are present and links to a guide to using backticks for syntax highlighting, so that people are not surprised that their HTML comment approach is not working?
  • This might be particularly useful because Codidact will guess the intended language when no language is specified using backticks, resulting in the appearance that HTML comments sometimes work (even though in reality this is just coincidence when Codidact guesses the same language).
  • [syntax highlighting]: https://en.wikipedia.org/wiki/Syntax_highlighting "Displaying code in colour to clarify its meaning"
#1: Initial revision by user avatar trichoplax‭ · 2024-04-22T17:17:32Z (7 months ago)
Syntax highlighting comments break the unsupported tags warning message
When an HTML tag is used in a post but is not supported by Codidact, a warning message is displayed listing the unsupported tags. However, [syntax highlighting] hints in the form of HTML comments such as `<!-- language-all:lang-python -->` are listed as `<undefined>` in the warning message:

![Unsupported HTML message, listing undefined instead of a tag name](https://meta.codidact.com/uploads/bkgiutcooexiohfrjmb50tvtkrlm)

This makes it difficult for people to guess which part of their draft is the cause of the problem.

## Should we exclude HTML comments from the list?
HTML comments (whether related to syntax highlighting or not) are not expected to be visible in the final post. Should anything that starts in `<!--` and ends in `-->` be excluded from the list shown in the warning message?

## Do language hints affect syntax highlighting?
As far as I can tell, these HTML comment syntax highlighting hints like `<!-- language-all:lang-python -->` have no effect on Codidact.

On Codidact, the language to use for syntax highlighting can instead be defined by surrounding a code block in triple backticks and putting the language name immediately after the opening backticks, like this:

````text
```python
def a():
    print("hi")
    return 1, 2
```
````

This is then rendered as coloured text on communities that support syntax highlighting such as Code Golf and Software Development. If testing this by editing, note that syntax highlighting is not currently activated here on Meta Codidact.

## Should we also support HTML comment hints?
If anyone wants Codidact to support these HTML comment hints for syntax highlighting, I recommend raising a separate feature request here on Meta Codidact.

## Should we link to guidance on using backticks?
Users accustomed to Stack Exchange may expect HTML comment hints to work for syntax highlighting. Should we have a separate warning message that appears when HTML comments are present and links to a guide to using backticks for syntax highlighting, so that people are not surprised that their HTML comment approach is not working?

This might be particularly useful because Codidact will guess the intended language when no language is specified using backticks, resulting in the appearance that HTML comments sometimes work (even though in reality this is just coincidence when Codidact guesses the same language).


[syntax highlighting]: https://en.wikipedia.org/wiki/Syntax_highlighting "Displaying code in colour to clarify its meaning"