# CSharp syntax coloring broken?

**URL:** https://meta.discourse.org/t/csharp-syntax-coloring-broken/27403
**Category:** Support
**Created:** [April 10, 2015, 5:29am UTC](https://meta.discourse.org/t/csharp-syntax-coloring-broken/27403 "2015-04-10T05:29:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![uwe\_keim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/uwe_keim/32/326762_2.png) [@uwe\_keim](https://meta.discourse.org/u/uwe_keim)
#### Post date: [April 10, 2015, 5:29am UTC](https://meta.discourse.org/t/csharp-syntax-coloring-broken/27403/1 "2015-04-10T05:29:14Z")

</div>

I’m using the syntax

````
```csharp
// Here goes my code.
```

````

To syntax color my code snippets.

This worked until recently.

- [Here is an older posting that still looks OK](http://entwicklergate.de/t/via-code-auf-eine-netzwerkfreigabe-zugreifen-berechtigungen/60?u=uwekeim).
- [Here is a newer posting the seems to look broken](http://entwicklergate.de/t/fehlermeldung-not-a-valid-win32-filetime-beim-setzen-der-creation-time-einer-datei/78?u=uwekeim) (see the non-colored comment and the bold “in” of the last code snippet).

**My question:**

Is my asumption correct? If yes, how can I fix it?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 10, 2015, 5:33am UTC](https://meta.discourse.org/t/csharp-syntax-coloring-broken/27403/2 "2015-04-10T05:33:26Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![uwe\_keim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/uwe_keim/32/326762_2.png) [@uwe\_keim](https://meta.discourse.org/u/uwe_keim)
#### Post date: [April 10, 2015, 5:37am UTC](https://meta.discourse.org/t/csharp-syntax-coloring-broken/27403/3 "2015-04-10T05:37:40Z")

</div>

That did the trick!

Seem what formerly worked as `csharp` is now known as `cs`.

![](https://global.discourse-cdn.com/meta/original/3X/6/0/60bea5de67231d9babaa0b8cc495717bc9517181.png)

After I changed this in my posting, my code snippet is colored correctly again.

Will try to change all my postings now… 😶

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 10, 2015, 5:40am UTC](https://meta.discourse.org/t/csharp-syntax-coloring-broken/27403/4 "2015-04-10T05:40:10Z")

</div>

The hint is called

````
```cs
code here
```

````

per:

![](https://global.discourse-cdn.com/meta/original/3X/d/c/dc90ccbb88767ef14a144dc53212d8cb32889a1e.png)

It is enabled by default.

If you omit it highlight js does a pretty fine job guessing, unless you are tricking it

```sql
if (bob == "test") {
   // SELECT * FROM table LIMIT 10
   System.WriteLine("HI");
}

```

```cs
if (bob == "test") {
   // SELECT * FROM table LIMIT 10
   System.WriteLine("HI");
}

```

```plaintext
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");
}
```

````

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 10, 2015, 8:13am UTC](https://meta.discourse.org/t/csharp-syntax-coloring-broken/27403/5 "2015-04-10T08:13:13Z")

</div>


