Note: I posted this on stack overflow but couldn't get an answer. I am trying it here.

I have files that are in urdf [Unified Robot Description Format] for ROS and sdf [Simulation Description Format] for gazebo. URDF is xml but Github only shows it in black. How can I get Github to show syntax highlighting on the file? Can I do this for any file extension including a missing extension?

NOTE: I am not referring to comments in markdown so back ticks don't apply.

<sdf version='1.6'>
  <world name='default'>


      <pose frame=''>0 0 30 0 0 0</pose>



Stack Overflow's syntax highlighting seems to get it.

  • $\begingroup$ why are you asking a question about github functionality at a robotics web site? .... it's like asking a gardening question at a medical site ... why are you not asking at github? $\endgroup$ – jsotola May 5 '20 at 0:13
  • $\begingroup$ Because these are robotics files. If github had stackoverflow, I would have asked. And I have seen some github questions on stack overflow too but not everyone there deals with urdf or sdf. $\endgroup$ – heretoinfinity May 5 '20 at 0:22
  • $\begingroup$ I am not making fun but here's what you could ask at the medical site in relation to gardening. Chosen pesticides and their effects, knee health if you would be kneeling with arthritis, shoulder health if you would be slashing weeds with arm swings, effect on heat on blood pressure and pulse $\endgroup$ – heretoinfinity May 5 '20 at 0:28
  • $\begingroup$ lol ... i thought about what i said afterwards and realized that there may be an implied overlap between medicine and medicinal plants ... knee health and shoulder health and effect of heat would have nothing to do with gardening because they are not specific to gardening $\endgroup$ – jsotola May 5 '20 at 4:04
  • $\begingroup$ They are not unique to gardening but gardening could exacerbate knee and shoulder health. One with pre-existing pain would not out of place for asking. I think trainers either ask or have people sign waivers that they are in good health after checking with a doctor. It is similar here. $\endgroup$ – heretoinfinity May 5 '20 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.