Skip to main content
14 events
when toggle format what by license comment
Oct 28, 2020 at 2:43 comment added Josh Goebel @animuson attempt to highlight ... based on generic language constructs This is not correct or at best a bit muddled. There are no "generic language constructs"... What happens (without Groovy loaded) is the highlighter says "Looks kind of like C++ or Java or Go, I dunno", then flips a coin. No, it's not truly random but given random code snippets it appears such. Now if SE truly wanted to build a list of "generic language constructs" and use those to highlight unknown languages, that would be an idea. I'm not sure it's a good idea, but it would at least provide consistent results.
Sep 26, 2020 at 2:54 comment added kriegaex Thanks for the insight. I never said it was implemented. As a normal user I have zero insight there. Some years ago I just tried and miraculously it worked. From a user perspective that was the important thing: I used it, it worked and it was extremely helpful.
Sep 25, 2020 at 19:39 history edited Ben KellyStaffMod
edited tags
Sep 25, 2020 at 19:38 answer added Ben KellyStaffMod timeline score: 8
Sep 25, 2020 at 15:42 comment added animuson StaffMod @kriegaex It has never been implemented. In Prettify, an invalid identifier reverted to default, and that is what you were seeing.
Sep 25, 2020 at 15:21 comment added kriegaex The lang-groovy construct worked fine for years with Prettify. Feel free to check with an older version of StackOverflow.
Sep 25, 2020 at 14:59 comment added Ben Kelly StaffMod Thanks for the report. This is indeed due to syntax highlighter migration. Groovy is not on our list of officially supported languages, so if it worked before, it must have been snuck in with a Prettify update and not documented. Marking this as status-review for now and will follow up soon.
Sep 25, 2020 at 14:59 history edited Ben KellyStaffMod
edited tags
Sep 25, 2020 at 14:38 comment added animuson StaffMod We have never had a lang-groovy syntax highlighter in our system, on either Prettify or highlight.js processors. It is supported by highlight.js but we did not pull the language in because we did not support it previously. The groovy tag is set to default, which means the highlighter will attempt to highlight the code based on generic language constructs because it does not know the actual language. If you'd like support, I'd suggest turning this into a feature request.
Sep 25, 2020 at 8:11 comment added 41686d6564 Yes, I can reproduce this. You might want to add that link to your question. Or (probably better), post this bug report as an answer in the linked question as advised there: "Any bugs and feedback can be posted here as an answer."
Sep 25, 2020 at 8:07 comment added kriegaex I also successfully edited one of my answers just now. But it does not work in many cases, for example here. I even saved the edit and dedented the code, but to no avail. So there must be a serious bug. Same goes for other answers I tried. Anyway, even if it would work, does anyone seriously consider it a good idea that I have to do that manually for dozens or hundreds of answers?
Sep 25, 2020 at 7:41 comment added 41686d6564 ```groovy seems to be working fine. I edited (but didn't submit) one of your answers. Here's the "before and after".
Sep 25, 2020 at 6:26 history edited kriegaex CC BY-SA 4.0
added 193 characters in body
Sep 25, 2020 at 6:19 history asked kriegaex CC BY-SA 4.0