This is the exact same problem that was raised in issue 13 (and closed without a fix) - if angular brackets are used to evaluate a value (e.g. call a method instead of print the method name), the syntax highlighting stops working. Remove the angular brackets, it works again.
Please excuse the weird example below, I've had to anonymize our real tests to post this bug, but pasting these examples into VSCode with the latest version of the Karate plugin will reproduce.
Example with angular brackets that breaks syntax highlighting:
Feature:
Background:
* url someUrl
* def dg = call read('classpath:com/DataGenerator.feature')
Scenario Outline:
Given def something = somethingElse
And somethingElse.a = <a>
And somethingElse.b = <b>
Examples:
| testSubject | a | b |
| dg.newSubject() | dg.method1() | dg.method2() |
Removing the angular brackets will fix the syntax highlighting, but code no longer works as it will not call the methods:
Feature:
Background:
* url someUrl
* def dg = call read('classpath:com/DataGenerator.feature')
Scenario Outline:
Given def something = somethingElse
And somethingElse.a = a
And somethingElse.b = b
Examples:
| testSubject | a | b |
| dg.newSubject() | dg.method1() | dg.method2() |
Not working with angular brackets:
Working with angular brackets removed, but code won't work now - it will just print the name of the method as if it was a string example, instead of calling the function.
This is the exact same problem that was raised in issue 13 (and closed without a fix) - if angular brackets are used to evaluate a value (e.g. call a method instead of print the method name), the syntax highlighting stops working. Remove the angular brackets, it works again.
Please excuse the weird example below, I've had to anonymize our real tests to post this bug, but pasting these examples into VSCode with the latest version of the Karate plugin will reproduce.
Example with angular brackets that breaks syntax highlighting:
Removing the angular brackets will fix the syntax highlighting, but code no longer works as it will not call the methods:
Not working with angular brackets:
Working with angular brackets removed, but code won't work now - it will just print the name of the method as if it was a string example, instead of calling the function.