Skip to content

Template Literal syntax causing new line #9

Closed
@zachleat

Description

@zachleat

This example on 11ty.io:

var { graphql, buildSchema } = require("graphql");
  
// this could also be `async function`
module.exports = function() {
  // if you want to `await` for other things here, use `async function`
  var schema = buildSchema(`type Query {
    hello: String
  }`);
  
  var root = {
    hello: () => "Hello world async!"
  };
  
  return graphql(schema, "{ hello }", root);
};

Works fine on https://prismjs.com/test.html
Works fine when using language text.
But when using language js it outputs this:

image

Note the ); on a new line.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions