uwe_keim
(Uwe Keim)
10 أبريل 2015، 5:29ص
1
I’m using the syntax
```csharp
// Here goes my code.
```
To syntax color my code snippets.
This worked until recently.
My question:
Is my asumption correct? If yes, how can I fix it?
I know @sam changed this around so you can specify exactly which languages can be highlighted, perhaps csharp is not one of the defaults and must be specified in site settings now?
إعجابَين (2)
uwe_keim
(Uwe Keim)
10 أبريل 2015، 5:37ص
3
That did the trick!
Seem what formerly worked as csharp
is now known as cs
.
After I changed this in my posting, my code snippet is colored correctly again.
Will try to change all my postings now…
sam
(Sam Saffron)
10 أبريل 2015، 5:40ص
4
The hint is called
```cs
code here
```
per:
It is enabled by default.
If you omit it highlight js does a pretty fine job guessing, unless you are tricking it
if (bob == "test") {
// SELECT * FROM table LIMIT 10
System.WriteLine("HI");
}
if (bob == "test") {
// SELECT * FROM table LIMIT 10
System.WriteLine("HI");
}
if (bob == "test") {
// SELECT * FROM table LIMIT 10
System.WriteLine("HI");
}
```sql
if (bob == "test") {
// SELECT * FROM table LIMIT 10
System.WriteLine("HI");
}
```
```cs
if (bob == "test") {
// SELECT * FROM table LIMIT 10
System.WriteLine("HI");
}
```
```
if (bob == "test") {
// SELECT * FROM table LIMIT 10
System.WriteLine("HI");
}
```
إعجابَين (2)