48

Go programming language syntax highlighting should work, it was implemented some time ago, see related question:

Go programming language syntax highlighting

However, without explicitly specifying the language using <!-- language: lang-golang -->, syntax highlighting does not work for Go. It worked in the past, but now it doesn't work, neither for new nor for old (existing) questions.

Using the expected language indicator for Go <!-- language: lang-go --> it doesn't work also. When using <!-- language: lang-golang --> it works.

As Gimby suggests, the Go tag info displays:

Code Language (used for syntax highlighting): lang-go

Most likely the code language has been changed / renamed without taking care of updating all reference / usage of it.

10
  • According to the link, it should be <-- language: lang-go -->.
    – Gimby
    Commented Aug 8, 2016 at 8:20
  • 1
    @Gimby Actually when using <-- language: lang-go --> it doesn't work either. When using <-- language: lang-golang -->, it works.
    – icza
    Commented Aug 8, 2016 at 8:30
  • 1
    Well there apparently lies the disconnect, the bottom of the go tag states: Code Language: lang-go . Apparently the identifier for the go language got changed and the tag wasn't updated to match.
    – Gimby
    Commented Aug 8, 2016 at 8:36
  • @Gimby And who can edit that?
    – icza
    Commented Aug 8, 2016 at 8:38
  • Only stack employees I think. Just have to be patient until this bug report is seen / picked up.
    – Gimby
    Commented Aug 8, 2016 at 9:03
  • @Gimby Thanks. Included your suggestion / finding in the answer.
    – icza
    Commented Aug 8, 2016 at 9:09
  • 4
    @Gimby mods have the ability too.
    – Braiam
    Commented Aug 8, 2016 at 23:59
  • @Braiam So mods can edit it, but will they edit it? I assume this is a 1-minute edit task. I also think the question got enough attention (41 upvotes), how to make this happen?
    – icza
    Commented Aug 10, 2016 at 8:36
  • @icza I was actually wondering the same thing since this tag dupe problem got resolved in an instant. I am thinking the tagging is wrong; this is a data problem and not a software bug. Perhaps it should be re-tagged as a feature request
    – Gimby
    Commented Aug 10, 2016 at 9:05
  • The struggle of waiting four days
    – random
    Commented Aug 13, 2016 at 16:24

2 Answers 2

4

Starting with the next build, the syntax highlighter config dropdown will say "lang-golang".

2
  • And when is this next build scheduled, or did it happen already? Because syntax highlighting for Go still doesn't work. Or if this needs to be selected manually on the Go tag info page, can someone do it?
    – icza
    Commented Sep 8, 2016 at 8:53
  • @icza Yeah, it needed to be picked on the tag page. I did that now.
    – Adam Lear StaffMod
    Commented Sep 8, 2016 at 15:18
6

So I just tried to do this. Here's the problem:

enter image description here

Manually editing the HTML on the page to inject a lang-golang one doesn't seem to work for whatever reason. We'll need a developer or CM to add lang-golang to the whitelist for default highlighting languages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .