Skip to content

pls fix the damn highlight #60

Open

Description

@OpenA

code example:

var example = function(a1) {

	var $class = 'unfunc';
	var $count = parseInt('1', 10) + parseInt (a1, 10);
	
	if(isNaN($count)) {
		$count = new Number(1);
	}
	
	if (isNaN ($count)) {
		$count = new Number (1);
	}
	
	switch($count) {
		case 1:
			$class = 'unfunc-one';
			break
		case 2:
			$class = 'unfunc-two';
			break;
		default:
			$class = 'unfunc-max';
	}
	
	switch ($count) {
		case 1:
			$class = 'unfunc-one';
			break
		case 2:
			$class = 'unfunc-two';
			break;
		default:
			$class = 'unfunc-max';
	}
	
	return $class;
}

and this is how it looks in textmate:
default

Activity

  1. nipuman commented on Sep 12, 2017

    @nipuman

    The problem appears since the following commit:
    a25c487#diff-f9061b7ed77660fb3007f1ac9e80f984

    @patrickrgaffney Do you have an idea? Thank you!

  2. OpenA commented on Apr 8, 2019

    @OpenA
    Author

    some grammar fixes

    diff --git a/Syntaxes/JavaScript.plist b/Syntaxes/JavaScript.plist
    index dd46b1f..cd80a4b 100644
    --- a/Syntaxes/JavaScript.plist
    +++ b/Syntaxes/JavaScript.plist
    @@ -48,7 +48,7 @@
     		</dict>
     		<dict>
     			<key>begin</key>
    -			<string>(?&lt;!\.)\b(import)(?!\s*:)\b</string>
    +			<string>(?&lt;!\.|\$)\b(import)(?!\s*:)\b</string>
     			<key>beginCaptures</key>
     			<dict>
     				<key>1</key>
    @@ -266,7 +266,7 @@
     		</dict>
     		<dict>
     			<key>begin</key>
    -			<string>(?&lt;!\.)\b(export)(?!\s*:)\b</string>
    +			<string>(?&lt;!\.|\$)\b(export)(?!\s*:)\b</string>
     			<key>beginCaptures</key>
     			<dict>
     				<key>1</key>
    @@ -628,7 +628,7 @@
     		<dict>
     			<key>begin</key>
     			<string>(?x)
    -                \b(class)(?=\s|$)
    +                (?<!\.|\$)\b(class)(?=\s|$)
                     (?:
                         \s+
                         ([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)
    @@ -825,7 +825,7 @@
     				</dict>
     			</dict>
     			<key>match</key>
    -			<string>(?&lt;!\.)\b(yield)(?!\s*:)\b(?:\s*(\*))?</string>
    +			<string>(?&lt;!\.|\$)\b(yield)(?!\s*:)\b(?:\s*(\*))?</string>
     			<key>name</key>
     			<string>meta.control.yield.js</string>
     		</dict>
    @@ -1239,7 +1239,7 @@
     				</dict>
     			</array>
     		</dict>
    -		<key>function-call</key>
    +	<!-- key>function-call</key>
     		<dict>
     			<key>patterns</key>
     			<array>
    @@ -1280,7 +1280,7 @@
     					</array>
     				</dict>
     			</array>
    -		</dict>
    +		</dict -->
     		<key>function-params</key>
     		<dict>
     			<key>patterns</key>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions