Questions tagged [language-hints]
For questions about the possibility to indicate which programming language a code block contains, to assist the [syntax-highlighting] feature.
10
questions
7
votes
1
answer
185
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-...
91
votes
2
answers
2k
views
Stop guessing/auto-detecting a language when you KNOW it will be incorrect
The problem: SE asks Highlight.js to autodetect the language when it knows there isn’t any optimal/correct choice for us to make - resulting in very poor outcomes.
Disclaimer: I say this as the ...
3
votes
1
answer
67
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 ...
5
votes
1
answer
66
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://...
7
votes
1
answer
141
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 ...
6
votes
2
answers
552
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?
2
votes
1
answer
165
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 ...
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;
...
10
votes
2
answers
127
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....
...
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 ...