Questions tagged [language-hints]

For questions about the possibility to indicate which programming language a code block contains, to assist the [syntax-highlighting] feature.

Filter by
Sorted by
Tagged with
7 votes
1 answer
158 views

When someone adds a "language identifier" to a code block does the specified syntax highlighting show in the "suggested edits" "queue"?

When I edit someone's code block with a language identifier: Example: from: ``` def py ``` to: ```python def py ``` Is that change reflected in the Suggested edits queue in the Inline or side-by-...
user avatar
73 votes
2 answers
939 views

Stop guessing/auto-detecting a language when you KNOW it will be incorrect

The problem: SE asks Highlight.js to auto-detect the language when it knows there is no optimal/correct choice for us to make - resulting in very poor outcomes. Disclaimer: I say this as the current ...
user avatar
  • 1,409
2 votes
1 answer
55 views

Language hint in list breaks list in StackExchange sites but not in Meta [duplicate]

I'm trying to add a language hint to a snippet in a list item like so: - A list with code: <!-- language: lang-none --> some code with follow-up... - Another item In the Meta ...
user avatar
  • 123
4 votes
1 answer
57 views

Why isn't this language hint working?

In the following answer I've inserted this language hint <!-- language-all: lang-html --> However, it is not picking it up and therefore not formatting it with HTML syntax colours. https://...
user avatar
7 votes
1 answer
140 views

Questions tagged with "Vaadin" should interpret code snippets as Java [closed]

On this post Use GridLayout to make a smart layout that responds to the window being resized? someone had to add the hidden language specifiers to flag the code snippets as Java. However: Vaadin ...
user avatar
6 votes
2 answers
551 views

How to hint objective-c code?

I have checked the language hint list and could not find one for objective-c. My question is how should I give an objective-c hint?
user avatar
  • 195
2 votes
1 answer
164 views

Language hints for quoted code

In this post I tried to add language hints for syntax formatting to code blocks quoted from the question. However, it seems they won't be honoured if I write them as a comment in my own part of the ...
user avatar
  • 4,221
6 votes
1 answer
300 views

Language: lang-none adds unwanted line breaks

The <!-- language: lang-none --> hint seems to add unwanted line break after each line. Without the hint: code line; another line; more; lines; With the hint: code line; another line; more; ...
user avatar
  • 4,079
10 votes
2 answers
123 views

Reason behind adding language hint to code?

Note, this is related to the question Can't see difference in suggested edited labelled 'language tag'; what to do?, but none of the questions I have regarding it were answered in it.... ...
user avatar
  • 15.9k
3 votes
1 answer
74 views

Display language hint changes in suggested edit diffs

I've recently seen more suggested edits with the edit description containing something along the lines of "Language Tag". The diff for these edits shows entire blocks of code being changed, except the ...
user avatar
  • 2,575