Here's a hacky way to do it. Found in my cornify Node.js module. :)
https://github.com/drgath/cornify/blob/master/lib/cornify.js
exports.addCorn = function () {
return(function () {/*
\\
\\
\\\\
\\\\
>\\/7
_.-(6' \\
(=___._/` \\
) \\ |
/ / |
/ > /
j < _\\
_.-' : ``.
\\ r=._\\ `.
<`\\\\_ \\ .`-.
\\ r-7 `-. ._ ' . `\\
\\`, `-.`7 7) )
\\/ \\| \\'/
|| .'
\\\\ (
>\\ >
,.-' >.'
<.'_.''
<'
*/}.toString().split("\n").slice(1,-1).join("\n"));
};
On Thu, Dec 16, 2010 at 9:02 AM, Christophe Eblé
<[email protected]>wrote:
> Ben,
>
> OK, my answer will be rather inconsistent considering what I said
> yesterday on Coffee Script but the fact is that CoffeeScript support
> heredoc.
>
> html = '''
> <strong>
> cup of coffeescript
> </strong>
> '''
>
> http://jashkenas.github.com/coffee-script/
>
> Poorly me!
>
> Chris
>
> On Thu, Dec 16, 2010 at 5:38 PM, Ben Alman <[email protected]> wrote:
> > A recent post reminded me that while recent Firefox versions support E4X
> in
> > JavaScript 1.6 (which I found one day doing a Google search for
> "javascript
> > heredoc"), all browsers really need to implement this.
> > I mean, wouldn't it be great if you could do this in your cross-browser
> > JavaScripts?
> > var multilinetext = <><![CDATA[
> > this
> > is
> > an
> > awesome
> > heredoc
> > ]]></>.toString();
> > (also, wouldn't it be great if the implementation wasn't encumbered by
> E4X
> > syntax?)
> > - Ben
> >
> > "Cowboy" Ben Alman
> > http://benalman.com/
> > RJ3 Productions
> > Broken Buddha Records
> >
> > --
> > To view archived discussions from the original JSMentors Mailman list:
> > http://www.mail-archive.com/[email protected]/
> >
> > To search via a non-Google archive, visit here:
> > http://www.mail-archive.com/[email protected]/
> >
> > To unsubscribe from this group, send email to
> > [email protected]<jsmentors%[email protected]>
> >
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]<jsmentors%[email protected]>
>
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]