-
Notifications
You must be signed in to change notification settings - Fork 118
Allow void elements to be specified in data provider #125
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
…ased on HTML Data manager, Add void to webCustomData.ts
I suggest to make HTMLCompletion already gets a HTMLDataManager in the constructor. I'd turn folding and the parser also a class that gets the HTMLCompletion as context. |
… classes instead of exported functions
} | ||
|
||
public getSelectionRanges(document: TextDocument, positions: Position[]): SelectionRange[] { | ||
const htmlDocument = this.htmlParser.parseDocument(document); |
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.
this is a slight tweak to parse the document here, it used to be parsed inside getApplicableRanges
which would happen for each position, now it only parses the document once.
ok @aeschli I've created classes for those 3 functions. The formatting makes it look like there are more changes than there really is, but I had to indent all the functions since they are all inside classes now. |
Thanks a lot @hahn-kev, nice PR! |
You're welcome, happy to contribute |
This fixes #123
Please note, this PR drops support for checking void elements
keygen
andmenuitem
these are long ago depreciated and not used it any tests. If you need these you can add them back in via a custom data provider and set"void": true
.