7

When will YAML language be supported in code blocks?

I come across more and more yaml language examples in Stack Overflow, especially for questions related to gitlab-ci configuration.

Example yaml code that should be prettified:

job_name:
  script:
    - echo some command

There seem to be similar request here (closed don't know why) or here (no clear answer if this will be done or not).

3
  • 1
    The first is closed as it is both too broad (asking for two different languages) and because it was already covered by a meta.SE post asking for the same. The second post you found shows there has been a feature request for this on Meta.SE for quite some time now. New syntax highlighters requires the company to update the highlight.js version, something that's only rarely done.
    – Martijn Pieters Mod
    Commented Mar 2, 2020 at 15:09
  • Could you point to feature request you mentioned? I'd gladly upvote it if it is only way to get this feature on stackoverflow.
    – makozaki
    Commented Mar 2, 2020 at 15:12
  • 1
    MSE FR: meta.stackexchange.com/questions/255968/…
    – rene
    Commented Mar 2, 2020 at 20:46

1 Answer 1

6

I kindly checked with a dev that is on the Q/A team if these kind of changes were considered low hanging fruit. There had been and there will always be performance considerations (both client and server-side as well us single user impact vs impact for the whole network) to take into account. Nevertheless, look what happened:

I have added the syntax highlighting logic for YAML. It is now live (as you can see above).

All praise Yaakov Ellis

4
  • 1
    Now I need to look for every post where I used lang=none for YAML and correct it. It's going to be a long night.
    – yivi
    Commented Mar 3, 2020 at 15:20
  • 2
    @yivi I'm sorry. It was a long shot and I didn't assume it would get done this fast, if at all. I guess being positively surprised is the new standard ;)
    – rene
    Commented Mar 3, 2020 at 15:23
  • 1
    Yeah, it was clearly tongue in cheek. It's great. Also, on the first post I could find with YAML I had already used "yaml" despite not being supported. Ahead of the times, I was.
    – yivi
    Commented Mar 3, 2020 at 15:25
  • 1
    If Yaakov keeps this up, I’m going to start confusing him with Oded. I like this new SE policy of “ask and ye shall receive”.
    – Cody Gray Mod
    Commented Mar 3, 2020 at 20:52

You must log in to answer this question.

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