-
-
Notifications
You must be signed in to change notification settings - Fork 35
Initial JSX support for class attributes added #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -44,6 +44,12 @@ export default function findSelector(document: TextDocument, position: Position) | |||
break; | |||
case TokenType.AttributeName: | |||
attribute = htmlScanner.getTokenText().toLowerCase(); | |||
|
|||
// Convert the attribute to a standard class attribute | |||
if (attribute === 'classname') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work with className
(i.e. camelcased)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my test cases I had the JSX instance written as "className" and it was converted to "classname" by the scanner.
Can we add test files (a These files aren't tested by the test suite (yet). They just exist so you can test the extension's behaviour manually. |
JS and JSX files have been added which follow the same structure as the existing HTML test. |
@ReiMcCl seems like you're not using |
Added className to the example js and jsx file 👍 |
Thanks! |
Shipped in version |
The below set of changes adds simple support for JSX peek through the same mechanism that is already present. This is related to the below issue:
#3