<table><tr><td style="">nibags created this revision.<br />Restricted Application added projects: Kate, Frameworks.<br />Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel.<br />nibags requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14270">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>In CoffeeScript, the character ` (grave accent) is used to insert JavaScript code, but in JavaScript that same character is used for templates. The templantes in embedded JavaScript code are done by prefixing backslashes, as mentioned in the CoffeeScript documentation [1].</p>
<p>To do this I had to overwrite some JavaScript rules, since some contexts of <tt style="background: #ebebeb; font-size: 13px;">javascript.xml</tt> contain` <IncludeRules context="Normal"/> `, where you can also insert templates.</p>
<p>I also added the escapes supported by CoffeeScript, which are the same as JavaScript [2], with the exception of the octal escapes.</p>
<p>All changes were tested using the CoffeeScript playground [3].</p>
<p>References:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">[1] CoffeeScript. Embedded JavaScript: <a href="https://coffeescript.org/#embedded" class="remarkup-link" target="_blank" rel="noreferrer">https://coffeescript.org/#embedded</a></li>
<li class="remarkup-list-item">[2] JavaScript escapes: <a href="https://mathiasbynens.be/notes/javascript-escapes#unicode-code-point" class="remarkup-link" target="_blank" rel="noreferrer">https://mathiasbynens.be/notes/javascript-escapes#unicode-code-point</a></li>
<li class="remarkup-list-item">[3] Try CoffeeScript: <a href="https://coffeescript.org/#try" class="remarkup-link" target="_blank" rel="noreferrer">https://coffeescript.org/#try</a></li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>BRANCH</strong><div><div>jsemb-coffeescript</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14270">https://phabricator.kde.org/D14270</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/folding/test.coffee.fold<br />
autotests/html/test.coffee.html<br />
autotests/input/test.coffee<br />
autotests/reference/test.coffee.ref<br />
data/syntax/coffee.xml</div></div></div><br /><div><strong>To: </strong>nibags<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>