Revision 839ba53...

Go back to digest for 27th April 2014

Features in KDE Base

Milian Wolff committed changes in [kate] /syntax/data:

For syntax highlighting, allow .js-files to start with a shebang.

When writing node.js scripts it is common to include a shebang at the
top, like `#!/usr/bin/env node`, and save it in a .js-file. However,
the syntax highlighter for JavaScript does not understand the shebang,
and tries to highlight it as JavaScript.

It is understood as two literal regular expressions (/usr/bin and /env
node), the last of which is not closed, meaning that the rest of the
file is attempted understood as part of the last regular expression.

This defeats syntax highlighting for .js-files that start with a

This patch allows .js files to start with a shebang.

REVIEW: 117571

File Changes

Modified 9 files
  • /syntax/data
  •   part/coffee.xml
  •   part/djangotemplate.xml
  •   part/html.xml
  •   part/javascript.xml
  •   part/mako.xml
  •   part/mediawiki.xml
  •   part/php.xml
  •   part/qml.xml
  •   part/rhtml.xml
9 files changed in total