11ty / eleventy-plugin-syntaxhighlight

A pack of Eleventy plugins for syntax highlighting in Markdown, Liquid, and Nunjucks templates.
https://www.11ty.dev/docs/plugins/syntaxhighlight/
MIT License
129 stars 32 forks source link

Template Literal syntax causing new line #9

Closed zachleat closed 5 years ago

zachleat commented 6 years ago

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.

zachleat commented 6 years ago

Live example: https://www.11ty.io/docs/data-js/

zachleat commented 5 years ago

This is fixed by https://github.com/11ty/11ty.io/pull/35 but we probably need to update the sample CSS in this repo too

zachleat commented 5 years ago

Highlighter for this still isn’t quite working, filed at #13