lxzliuxinzhu / syntaxhighlighter

Automatically exported from code.google.com/p/syntaxhighlighter
GNU General Public License v3.0
0 stars 0 forks source link

[PATCH] basic brush for scala #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
this is a basic brush for scala http://scala-lang.org/

Original issue reported on code.google.com by david.bernard.31 on 6 Dec 2007 at 10:42

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you, I will add it to the distro.

Original comment by alex.gor...@gmail.com on 10 Dec 2007 at 8:53

GoogleCodeExporter commented 8 years ago
Thank you.

you create a great js tool (I saw it the first time with Mochikit, 2 years ago, 
when
I try TurboGear (Python, mochikit). Now I learn scala, and I remember your nice 
lib.

Original comment by david.bernard.31 on 10 Dec 2007 at 9:46

GoogleCodeExporter commented 8 years ago
The highlighting for the operator-like Scala keywords (=>, <-, etc.) doesn't 
work, apart from the underscore, 
-- I think because the word-boundary \b confuses the regex. I took the last 
line off the "keywords" variable 
and added the following:

var keyops =    '[_:=><%#@]+';

and in the regex list:

{ regex: new RegExp(keyops, 'gm'),  css: 'keyword' },

which seems to more or less do the trick.

Original comment by chronodm on 22 Apr 2008 at 9:06

Attachments:

GoogleCodeExporter commented 8 years ago
Hi everyone, I am attaching a highlighter for Scala which is a hybrid of Java 
and
Python highlighters, plus chronodm's suggestion above. I used Python's regexps 
to
handle double-quoted strings and multiline strings, which previously submitted
highlighters didn't.

It would be nice to have the Scala highlighter added to the trunk, so that we 
could
suggest incremental patches.

Cheers,

Yegor Jbanov

Original comment by Yegor.Jb...@gmail.com on 30 Jun 2008 at 3:19

Attachments:

GoogleCodeExporter commented 8 years ago
Oops! I'm sorry. I think I might have uploaded a broken version. This one 
should work.

Original comment by Yegor.Jb...@gmail.com on 30 Jun 2008 at 3:41

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by alex.gor...@gmail.com on 9 Oct 2008 at 8:59