<table><tr><td style="">nibags created this revision.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: kde-frameworks-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/D13787">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p><strong>CoffeeScript</strong></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Fix [bug #394365](URL "<a href="https://bugs.kde.org/show_bug.cgi?id=394365"" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=394365"</a>):</li>
</ul>

<p><strong>Bug:</strong> Identifiers with member objects are not highlighted. For example, when writing <tt style="background: #ebebeb; font-size: 13px;">timelineEvent.class</tt>, <tt style="background: #ebebeb; font-size: 13px;">class</tt> is highlighted as a Keyword, which sends a new context, showing an incorrect highlighting.</p>

<p><strong>Solution:</strong> Add a rule to detect identifiers of the type: <tt style="background: #ebebeb; font-size: 13px;">iden1.iden2.iden3</tt>. The first word after a "." is highlighted as an identifier. However, the first word before a "." can be a keyword (as "globals").</p>

<p><strong>JavaScript</strong></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Fix [bug #366797](URL "<a href="https://bugs.kde.org/show_bug.cgi?id=366797"" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=366797"</a>):</li>
</ul>

<p><strong>Bug:</strong> When writing member objects (<tt style="background: #ebebeb; font-size: 13px;">iten1.iden2.iden3</tt>), all text are highlighted after ".", including spaces. For example, <tt style="background: #ebebeb; font-size: 13px;">instanceof</tt> and <tt style="background: #ebebeb; font-size: 13px;">Number</tt> are highlighted as <tt style="background: #ebebeb; font-size: 13px;">Object Member</tt>.</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">object.property instanceof Number;</pre></div>

<p><strong>Solution:</strong> Only the first word after <tt style="background: #ebebeb; font-size: 13px;">.</tt> is highlighted as <tt style="background: #ebebeb; font-size: 13px;">Object member</tt>.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Fix small bug in Shebang: multiple lines can be highlighted as Shebang (only the first line is considered Shebang).</li>
</ul>

<p>Example:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">#! shebang1
#! shebang2
#! shebang3
...</pre></div>

<p><strong>Others:</strong></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">CoffeeScript: Add mimetype <tt style="background: #ebebeb; font-size: 13px;">application/vnd.coffeescript</tt>: <a href="http://dcjtech.info/topic/coffeescript-mimetype/" class="remarkup-link" target="_blank" rel="noreferrer">http://dcjtech.info/topic/coffeescript-mimetype/</a></li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">JavaScript: Add extension <tt style="background: #ebebeb; font-size: 13px;">*.ts</tt> of TypeScript. TypeScript is a superset of JavaScript, therefore, the syntax highlighting is the same, except for some features that aren't in the JavaScript highlighter. Therefore, this may be temporary as long as there isn't a TypeScript highlighting file.<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://bugs.kde.org/show_bug.cgi?id=384716" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=384716</a></li>
</ul></li>
</ul>

<p>I also added a test file for CoffeeScript.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>BRANCH</strong><div><div>fix-js-coffee</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13787">https://phabricator.kde.org/D13787</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/folding/test.coffee.fold<br />
autotests/folding/test.js.fold<br />
autotests/html/test.coffee.html<br />
autotests/html/test.js.html<br />
autotests/input/test.coffee<br />
autotests/input/test.js<br />
autotests/reference/test.coffee.ref<br />
autotests/reference/test.js.ref<br />
data/syntax/coffee.xml<br />
data/syntax/javascript.xml</div></div></div><br /><div><strong>To: </strong>nibags<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>