|
From: <caw...@us...> - 2007-07-16 15:12:49
|
Revision: 2765
http://svn.sourceforge.net/rubyeclipse/?rev=2765&view=rev
Author: cawilliams
Date: 2007-07-16 08:12:48 -0700 (Mon, 16 Jul 2007)
Log Message:
-----------
fix #5182 - Heredocs with variable substitution breaks syntax highlighting
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java 2007-07-16 14:47:09 UTC (rev 2764)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java 2007-07-16 15:12:48 UTC (rev 2765)
@@ -301,9 +301,11 @@
return new Token(fContentType);
case Tokens.tSTRING_BEG:
fOpeningString = fContents.substring(fOffset - origOffset, lexerSource.getOffset()).trim();
- if (fOpeningString.equals("'")) {
+ if (fOpeningString.equals("'") || fOpeningString.startsWith("%q")) {
inSingleQuote = true;
- }
+ } else if (fOpeningString.startsWith("<<")) { // here-doc
+ fOpeningString += "\n";
+ }
fContentType = RUBY_STRING;
return new Token(RUBY_STRING);
case Tokens.tXSTRING_BEG:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|