4

Jeff's answer in Syntax highlighting language hints lists many languages, but Tcl isn't there; however, Tcl syntax highlighting is supported if you use the tag. (Ref: How to collect the output of man command in tcl

Could we get support for syntax-hinting support for Tcl?

I'd like to be able to use

<!-- language: lang-tcl -->
1

2 Answers 2

2

There isn't any built-in support for TCL that's getting applied just because of the tag. The answer in the linked question is simply being highlighted using the lang-default style:

set output [exec man cmd-name]

Unfortunately, that's probably not good enough for properly highlighting all TCL code. You might try something like lang-sh, but the result may not be perfect, either.

Stack Overflow uses Google's Code Prettify project for the syntax highlighting support. It is a separate project from the Stack Exchange sites, and maintained by mostly different people.

As I advised Lukas to do here, you will have to either submit a feature request to Prettify and wait for the TCL language to be implemented, or submit a style containing support for the language yourself. Once Prettify is updated, the latest version can be deployed across the network, and you'll be able to specify lang-tcl hints as you please.

3
  • A side-note: while I support this question in general, when we switched to using different styles in Prettify I asked that Tcl be explicitly mapped to lang-default (rather than none? I forget the exact details) as default's not too awful. Commented May 24, 2011 at 14:53
  • @Donal: I'm not sure I understand what you mean. Prettify uses lang-default now. Do you mean that you're responsible for this change from an earlier question? Did it previously default to lang-none? I don't know of any other language that does that; why should Tcl be that way?
    – Cody Gray
    Commented May 24, 2011 at 14:58
  • Things changed around a fair bit at the time that Prettify was introduced fully. At one point, it was most certainly defaulting to none. It may have got changed since then; I prefer to avoid fiddling around with meta-work. :-) Commented May 24, 2011 at 15:27
3

Currently used highlight.js library seems to have a TCL support included: SUPPORTED_LANGUAGES.md#L192, but is not mentioned in a loader: https://dev.sstatic.net/js/highlightjs-loader.en.js (https://meta.stackexchange.com/a/184109)

Can we get back to the topic of adding TCL to highlighted syntaxes?

You must log in to answer this question.

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