Skip to content

Releases: 11ty/eleventy-plugin-syntaxhighlight

Eleventy Syntax Highlighter v5.0.0

12 Apr 21:12
Compare
Choose a tag to compare
  • Breaking: we no longer throw an error when you pass in an invalid language. Use errorOnInvalidLanguage: true to re-enable errors by default. #70 #73
  • Breaking: changes default lineSeparator option from "<br>" to "\n" #82 This fixes an issue with missing line breaks in some feed readers!
  • Fixed: Markdown syntax highlighter generated invalid HTML in some cases #80 Thank you @marvinhagemeister!
  • Bug fixes for diff- syntax #75 #76
  • Removes undocumented character wrapping feature #81

Plugin documentation: https://www.11ty.dev/docs/plugins/syntaxhighlight/
Milestone: https://github.com/11ty/eleventy-plugin-syntaxhighlight/milestone/14?closed=1
Full Changelog: v4.2.0...v5.0.0

Contributors

Eleventy Syntax Highlighter v4.2.0

01 Nov 22:15
Compare
Choose a tag to compare

Full Changelog: v4.1.0...v4.2.0

Eleventy Syntax Highlighter v4.1.0

01 Nov 22:13
Compare
Choose a tag to compare

What's Changed

  • preAttributes and codeAttributes options can be callback functions by @chriskirknielsen in #50 #52
  • Fix Extra blank lines in highlighted output @rmcginty in #59 #60
  • Demo style improvements #64
  • Add nunjucks and njk languages, aliased to jinja2 #68.

New Contributors

Full Changelog: v4.0.0...v4.1.0

Eleventy Syntax Highlighter v4.0.0

31 Jan 14:38
Compare
Choose a tag to compare

Adds new highlight JavaScript function, for use in 11ty.js templates.

Docs: https://www.11ty.dev/docs/plugins/syntaxhighlight/#javascript-function-(for-11ty.js)

e.g. sample.11ty.js:

module.exports = function(data) {
  let result = this.highlight("js", "var test;");
  return result;
};

Eleventy Syntax Highlighter v3.2.2

31 Jan 14:36
Compare
Choose a tag to compare
  • Bundles the Prism diff-highlight plugin, allowing the use of diff- languages and + and - prefixes on lines.
    • Works as expected with language aliases.
  • Enables Prism silent mode to avoid "Language does not exist" console.logs.

v3.1.1

23 May 19:47
Compare
Choose a tag to compare

Improves accessibility friendliness of HTML with the addition of preAttributes and codeAttributes to options for global attribute additions to the rendered HTML. Pass in an object literal! Thank you @ChrisBrownie55 for #48.

Read more at: https://accessibilityinsights.io/info-examples/web/scrollable-region-focusable/

Milestone: https://github.com/11ty/eleventy-plugin-syntaxhighlight/milestone/9?closed=1

Eleventy Syntax Highlighter v3.0.1

03 Jan 17:12
Compare
Choose a tag to compare

Issues Resolved

https://github.com/11ty/eleventy-plugin-syntaxhighlight/issues?q=is%3Aissue+milestone%3Av3.0.1+is%3Aclosed

Links

⭐️ Support Eleventy by starring us on GitHub! This will increase our project’s visibility on staticgen.com, a big giant list of static site generators.
🐦 Follow us on Twitter @​eleven_ty!

Eleventy Syntax Highlighter v3.0.0

03 Jan 02:34
Compare
Choose a tag to compare

By default previous versions of Eleventy attempted to wrap each individual line in <span class="highlight-line"> markup for line highlighting features. This worked in a most cases but was unreliable when tokens stretched between multiple lines (like template literals).

In v3.0, lines are only wrapped when line number arguments are passed to the highlighting plugin instance.

You can switch globally back to the old behavior using a configuration option.

eleventyConfig.addPlugin(syntaxHighlight, {
  alwaysWrapLineHighlights: true
});

Also the docs for this plugin moved to https://www.11ty.dev/docs/plugins/syntaxhighlight/

Eleventy Syntax Highlighter v2.0.2

20 Apr 03:45
Compare
Choose a tag to compare

Eleventy is a simpler Static Site Generator! This is a Prism.js syntax highlighter plugin for Eleventy!

Changelog

Milestone

Dependency Semver Major Version Updates

  • None

Links

⭐️ Support Eleventy by starring us on GitHub! This will increase our project’s visibility on staticgen.com, a big giant list of static site generators.
🐦 Follow us on Twitter @​eleven_ty!

eleventy-plugin-syntaxhighlight v2.0.0

29 Sep 02:54
Compare
Choose a tag to compare

Eleventy is a simpler Static Site Generator! This is a Prism.js syntax highlighter plugin for Eleventy!

Major Version Breaking Changes

Changelog

Milestone

Dependency Semver Major Version Updates

  • None

Links

⭐️ Support Eleventy by starring us on GitHub! This will increase our project’s visibility on staticgen.com, a big giant list of static site generators.
🐦 Follow us on Twitter @​eleven_ty!