
15 Nov
2012
15 Nov
'12
3:10 p.m.
On 11/15/2012 09:48 AM, Michael Snoyman wrote:
You could solve this in one of two ways:
1. Switch over to embedding `t` as JSON and concatenating in Javascript, e.g.: [julius| str = "a" + #{toJSON t} + "bc"|]. I think we never ended up adding the aeson instances to shakespeare-js, but I'm in favor of doing so. 2. Writing some escape algorithm on the characters. This would be more complicated.
The reason we haven't implemented the idea that Greg mentions is that it prevents certain use cases, such as interpolating actual Javascript code.
The first way works wonderfully, thanks! Speaking about corner use cases, that's reminds me situation with #{} and ^{} in Hamlet. Why not to go the same route in Julius? Dmitry