Comment Highlighting Broken
See original GitHub issueI’m using Prisma and they generate the schema for us. One of the peices they generate has a comment like this:
type Query {
users(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [User]!
cartItems(where: CartItemWhereInput, orderBy: CartItemOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [CartItem]!
items(where: ItemWhereInput, orderBy: ItemOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Item]!
orderItems(where: OrderItemWhereInput, orderBy: OrderItemOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [OrderItem]!
orders(where: OrderWhereInput, orderBy: OrderOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Order]!
user(where: UserWhereUniqueInput!): User
cartItem(where: CartItemWhereUniqueInput!): CartItem
item(where: ItemWhereUniqueInput!): Item
orderItem(where: OrderItemWhereUniqueInput!): OrderItem
order(where: OrderWhereUniqueInput!): Order
usersConnection(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): UserConnection!
cartItemsConnection(where: CartItemWhereInput, orderBy: CartItemOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): CartItemConnection!
itemsConnection(where: ItemWhereInput, orderBy: ItemOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): ItemConnection!
orderItemsConnection(where: OrderItemWhereInput, orderBy: OrderItemOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): OrderItemConnection!
ordersConnection(where: OrderWhereInput, orderBy: OrderOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): OrderConnection!
"""
Fetches an object given its ID
"""
node("""
The ID of an object
"""
id: ID!): Node
}
That last comment is a bit weird and seems to be breaking highlighting.
Is this a valid graphql comment? GitHub seems to highlight it just fine, but this extension highlights it like this:
This very well may be an issue with Prisma too, will open an issue over there.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
PHP Syntax highlighting broken by SQL comment #145124
Issue Type: Bug Syntax highlighting breaks after a SQL comment on the last line of a multi-line SQL statement.
Read more >Code highlighting with markdown in comments is broken
When editing a comment with markdown code, the highlighting is working, but once the comment is saved, all highlighting is gone. See attached ......
Read more >Vimrc syntax highlighting broken with long comments ...
I tend to have some long /* comments */ - who doesn't? - but gVim (win7, 64bit) easily breaks the syntax highlighting. All...
Read more >Highlighting of comment range on hover broken - gerrit
It's expected that on hover over the comment the corresponding commented text is highlighted. What do you see instead? For both comments it...
Read more >C# syntax highlighting not working - Visual Studio Feedback
Since upgrading to VS 2019 I have been having syntax highlighting issues. Freshly cloned projects look correct, but more often than not some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wesbos I don’t see github highlighting it fine: (notice the blue vs black colour of the first and second comments)
I have fixed the issue, though I’m not really happy with the regexp. In the linked issue, it’s a little unclear whether the triple-quotes just after a parenthesis is a desired behaviour or not.
Thanks for the report. Will push a fix over the weekend