<table><tr><td style="">nibags edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-64chhbrunx5jxpw/">(Show Details)</a><br />nibags added reviewers: Framework: Syntax Highlighting, dhaumann, cullmann.
</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/D18174">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">## Allow regular expressions after ": "<br />
<br />
BUG: 361875<br />
<br />
Previously, after `text: `, `[]: ` or `$text=: ` regular expressions weren't highlighted (the `check_div_1` context prevents highlighting regex, similar to `NoRegExp` context in "javascript.xml"). Regular expressions are allowed there, so they will now be highlighted.<br />
{F6539652}<br />
<br />
## Don't highlight HEREDOC in singleton class definition (operator <<)<br />
<br />
BUG: 358273<br />
<br />
Now, after the keyword "class", Heredoc's will not be highlighted [1]. For example:<br />
{F6539653}<br />
<br />
Before, `<<Foo` was highlighted as Heredoc. <br />
<br />
I did some tests in Ruby 2.6.0, 2.5.1 and 2.3.8, and Heredoc isn't considered in the code: `class <<Foo`, `class <<21`, `class <<"Foo"` or `class <<-Foo`, so I can say that the fix is correct.<br />
<br />
<br />
## Improvements in HEREDOC:<br />
<br />
* Add squiggly HEREDOC (introduced in Ruby 2.3) [2][3]<br />
<br />
For example: `<<~HEREDOC`<br />
<br />
* Backticks can surround identifiers [3]. Example: <<-`HEREDOC`<br />
<br />
* Improve highlighting of identifier quotes. Now you need to close quotes to highlight the HEREDOC.<br />
<br />
For example, HEREDOC was previously highlighted as: `<<"HEREDOC` , `<<HEREDOC"`<br />
<br />
<br />
I also added a modeline to force the use of tabs as an indentation, since the file uses tabs.<br />
<br />
**References:**<br />
* [1] Ruby/Rails Programming. Singleton Classes in Ruby (aka eigenclasses): https://codequizzes.wordpress.com/2014/04/11/singleton-classes-in-ruby-aka-eigenclasses/<br />
* [2] Infinum. Multiline strings in Ruby 2.3 - the squiggly heredoc: https://infinum.co/the-capsized-eight/multiline-strings-ruby-2-3-0-the-squiggly-heredoc<br />
* [3] Ruby-doc.org. Here Documents: https://ruby-doc.org/core-2.5.1/doc/syntax/literals_rdoc.html#label-Here+Documents<br />
</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18174">https://phabricator.kde.org/D18174</a></div></div><br /><div><strong>To: </strong>nibags, Framework: Syntax Highlighting, dhaumann, cullmann<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>