It's not often I see a Shopify theme that actually supports article comments but I did stumble across one today which had a loop like this
{% for comment in article.comments %}
//...
{% endfor %}
Everything after comment in the opening tag was highlighted as if it were a code comment until the schema, which was interesting. The schema was still highlighted but the text became italic, as if the comment styles for my theme were only partially applied.
I quite like the fact that the schema still has syntax highlighting inside the comment blocks so I'm not too fussed about that, even if it shouldn't have.
Another issue with subsequent code being considered comment content is that autocompletions don't seem to work inside comment blocks.
It's not often I see a Shopify theme that actually supports article comments but I did stumble across one today which had a loop like this
Everything after
comment
in the opening tag was highlighted as if it were a code comment until the schema, which was interesting. The schema was still highlighted but the text became italic, as if the comment styles for my theme were only partially applied.I quite like the fact that the schema still has syntax highlighting inside the comment blocks so I'm not too fussed about that, even if it shouldn't have.
Another issue with subsequent code being considered comment content is that autocompletions don't seem to work inside comment blocks.
https://user-images.githubusercontent.com/9138568/207418028-bc7b1b20-8451-4430-8683-b35e0ee9a542.mov
Here's a video to demonstrate in case that helps. Hope it doesn't take too much energy to get through my 100 attempts at typing
article.comments
👀