question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comment Highlighting Broken

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kumarharshcommented, Apr 23, 2018

@wesbos I don’t see github highlighting it fine: image (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.

1reaction
kumarharshcommented, Apr 20, 2018

Thanks for the report. Will push a fix over the weekend

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found