I was updating some of my text expansions to make fuller use of of expansion tags, but I’m having an issue with expansion tags located in pairs of square brackets.
I would expect this to expand to
[MY_TEXT_HERE], but the triple opening bracket seems to prevent this from being parsed (the triple closing bracket does not seem to cause an issue). Is there an escape sequence, etc. that can be used, or is it simply a bug / edge case?
On a separate note, I came across this issue as I was updating my personal text expansion for handler docstrings…
(* (CLASS) → CLASS HANDLER DESCRIPTION. Parameters: NAME [CLASS] : PARAMETER DESCRIPTION. Result: [CLASS] : RESULT DESCRIPTION. *)
…and this got me thinking – is there any sort of standard docstring format for AppleScript that could one day be parsed by Script Debugger to provide quick help for function completion, similar to Xcode? Could be very useful!
Swift uses ‘Documentation Comments’ (see here if interested) – an AppleScript-style version of this could look something like this:
(** Handler description. - Requires: Requirements. - Parameters: - Identifier: Class - Description. - Throws: Error information. - Returns: Class - Return value. *)