Skip to content

Releases: ccampbell/rainbow

2.1.7

12 Sep 02:43
Compare
Choose a tag to compare
  • Updated to gulp 4.0 to remove hack
  • Updated unit tests to run using luna

2.1.6

12 Sep 02:41
Compare
Choose a tag to compare
  • Attempted to fix npm install issue related to gulp 3.9 hack included in 2.1.5

2.1.5

12 Sep 02:41
Compare
Choose a tag to compare
  • Fixed issue with language rules using dollar signs that was merged but never deployed (#208)
  • Replaced webworker-threads library with newer web-worker library built on top of node worker threads
  • Attempted to fix gulp issues with newer node versions

2.1.4

01 Jun 21:45
Compare
Choose a tag to compare
  • Fixed issue where Rainbow could not be installed via Node (#212)
  • Fixed issue where sometimes code blocks did not show up in Safari

2.1.3

02 Apr 18:27
Compare
Choose a tag to compare
  • Fixed issue where sometimes highlighted code blocks could replace the wrong code block (#207)
  • Fixed issue where php new keyword could be highlighted inside a string (#202)
  • Removed ugly hack for fixing minified code

2.1.2

03 Aug 02:03
Compare
Choose a tag to compare
  • Updated ruby numbers to support underscores (#198)

2.1.1

03 Aug 01:54
Compare
Choose a tag to compare
  • Fixed php tag scopes when embedded inside html (#199)

2.1.0

04 Jul 17:15
Compare
Choose a tag to compare
  • Fixed issue where passing null or false for a match name would result in a runtime error
  • Fixed issue where strings were not correctly highlighted following a comma
  • Fixed issue where javascript selector $ was not correctly highlighted all the time
  • Fixed crash if you do not include an inherited language in your build/page
  • Fixed issue where html boolean attributes with dashes were not correctly highlighted
  • Fixed issue where comments following certain strings did not highlight correctly
  • Updated keyword matching to not match function calls
  • Updated language grammars for golang to use proper scopes and added tests
  • Added SQL language grammar
  • Added async and await keywords to C# grammar
  • Added ability to remove languages dynamically using Rainbow.remove
  • Refactored the regex matching code to no longer process matches recursively (see #197 for more information). Should also make everything a bit faster.

2.0.0

02 Jul 20:20
Compare
Choose a tag to compare

Rainbow 2.0 is basically a complete rewrite from the ground up. Here is a summary of most of the changes

Changes

  • Updated code highlighting to use webworkers to prevent the main thread from being blocked while processing code blocks

  • Added support for Node.js

  • Added Rainbow.colorSync method for synchronous highlighting (only for node.js)

  • Refactored source code into ES6 modules (using buble + rollup for compilation)

  • Updated unit tests to run via Karma

  • Added ES6 support to the JavaScript language grammars

  • Updated themes to use SASS to share common logic

  • Added SASS mixin to make it easy to add custom rules to specific languages

  • Updated themes to wait until code is highlighted before displaying it to prevent a flash of unstyled content (FOUC)

  • Added a preload animation for when the code takes some time to highlight

  • Updated code highlighting for each block to be self contained. Previously there was a global state that led to some obscure bugs.

  • Fixed race condition where calling Rainbow.color while another Rainbow.color call is running could cause some strange behavior

  • Added ability for a language to extend any other language.

    For example you could add a language grammar for jsx that inherits all the rules from javascript while javascript inherits all the rules from generic..

  • Updated build process to run using gulp to simplify creating custom packages

  • Updated build to use Uglify instead of closure compiler

  • Added ability to defer highlighting so it does not happen immediately on page load

Backwards incompatible changes

  • Removed Rainbow.addClass method

  • Updated Rainbow.extend to no longer extend generic patterns by default

    This means that passing true as the second argument is no longer needed. Instead if you pass a language as the second argument the rules will extend that language.

  • Dropped support for older versions of Chrome/Firefox/IE.

    Check README.md for list of supported browsers.