3

There are no tag trees because it would be too complicated.

However, there is one place where specifying a bit of hierarchy is urgently needed. This is code formatting.

I thought recently syntax highlighter to be intelligently detecting the language, but it proved to be wrong. Syntax highlighter has no intelligence, it just uses tags to detect what formatting to use.

It means for example, that JavaScript code won't be highlighted as JavaScript in tag, because there's no language named "Dojo". I must add tag to my question to allow proper syntax highlighting, even if question is so dojo-specific, that tag wouldn't be recommended otherwise.

I propose there should be possible to say that the tag X is the subset of language Y, therefore automatically enabling proper syntax highlighting without adding surplus tags.

1
  • I would not be outright opposed to child tags for the sake of clarity, but it would be awfully complex to implement.
    – user206222
    Commented Jul 12, 2013 at 5:19

1 Answer 1

3

This doesn't directly address your feature request, but solves the problem you're asking about. This answer contains details on how to specify language highlighting.

In your case, if you want the Javascript language highlighting, you can specify it manually using

<!-- language: lang-js -->
//Your code here

This will prettify your language in Javascript.

3
  • 1
    Well, it solves the problem with my questions and my answers as long as I don't forget that syntax. It could solve problems with answers to my questions, if I edit them. But it doesn't solve the problem globally. Adding a choose-language button would also be good. I'm afraid I'd have to search for that syntax each time I write a question/answer :( Commented Jul 12, 2013 at 5:23
  • Right, this is a partial solution. This doesn't address the feature request exactly.
    – user206222
    Commented Jul 12, 2013 at 5:29
  • 1
    But anyway, it's a good tip in case the feature would be declined. Commented Jul 12, 2013 at 5:32

You must log in to answer this question.

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