Added html language implementation#385
Conversation
| @@ -0,0 +1,29 @@ | |||
| languageId: html | |||
There was a problem hiding this comment.
I wonder if "clear" should leave the angles. Can't decide
There was a problem hiding this comment.
Take and clear always have the same range so far. I don't want to change that
|
I added a plaintext version as well |
yeah was worried about that. what happens if you switch the order like this? |
pokey
left a comment
There was a problem hiding this comment.
Ok looks good with one last question
| node: SyntaxNode, | ||
| selection: SelectionWithEditor | ||
| ) { | ||
| if (node.type === "attribute_value") { |
There was a problem hiding this comment.
Will an attribute value always be a string?
There was a problem hiding this comment.
No. But it's the only type that can contain other matching pairs
There was a problem hiding this comment.
Ok so this is a hack, then, right? Because there might be things that are children that are not strings? It's ok if it's a hack, we should just document that in a comment
There was a problem hiding this comment.
You could also just check node parent type as well maybe?
There was a problem hiding this comment.
Or check that it has first and last child of type "?
There was a problem hiding this comment.
I wouldn't say it's a hack. It is a type that can contain text based matching pairs. But I can't contain any children in the tree sitter as far as I know. I tried with few different values and it all behaved as expected.
No description provided.