+4 votes
asked by (550 points)
For this Q&A site, is there a preferred language to use for Sugarcube and/or Harlowe code so that it is nicely highlighted for questions?

1 Answer

+1 vote
answered by (132k points)
selected by
Best answer

I am assuming you mean the 'language' selection within the Code snippet dialog, then I personally either use the 'Not Set' option if the Passage example contains mostly Text and TwineScript (macros) which is the majority of the examples, or 'HTML' if it contains mostly HTML element structures. Obviously if the example is either CSS or Javascript then I use the relevant selection.

commented by (550 points)
Fair enough, I was hoping one of the languages made twine-script pretty.
commented by (132k points)
The term Twine-Script is a bit like the term Motor-Vehicle, in that it describes a general class of programming languages rather than a specific programming language.

As each of the (currently) three default Story Formats has it's own syntax for it's macro language, and as each syntax is structurally different to the other two it would be difficult for a single language formater to support all three.

I believe that Snowman's syntax comes the closest to any of in-built formaters/languages supported by the Code snippet dialog, which would be either PHP or HTML.
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.