Skip to content

2.2.1

Compare
Choose a tag to compare
@WebCoder49 WebCoder49 released this 18 Feb 16:01
· 33 commits to main since this release

🆕 What's in this release?

Click if you want to upgrade from an earlier release to this one.
  1. I've released this as a new minor version as upgrading generally shouldn't break anything, but one change may cause problems if you've added any custom JavaScript to interact with code-input elements. For optimisation reasons, the code-input element now scrolls instead of the textarea/pre code, the pre code element will change size in response to the textarea, and anything that needs to stay fixed relative to the code-input element rather than scrolling (i.e. the dialog boxes shown below) has to be placed inside the (code-input element).dialogContainerElement. Please don't hesitate to contact me (@WebCoder49) if you have problems, as I feel upgrading should generally improve your code-input experience.
  2. The lang attribute on code-input elements has been renamed language, so that it does not conflict with the HTML lang global attribute. lang is still supported but is deprecated.

🚀 This release is a big one, with improvements in 2 main areas:

➕ New Features

Go To Line plugin Auto-Close Brackets plugin Find And Replace plugin
image - line 10, column 23 image - with the Indent plugin and Auto-Close Brackets, get this code with fewer keystrokes! image - syntax-highlighter agnostic!
  • The Go To Line plugin has been added. Thanks to @andrelsm for writing this code! #66
  • The Auto-Close Brackets plugin has been added. #73
  • The Find And Replace plugin has been added. #79

For more information, please see plugins/README.md.

🤩 Code Optimisation and Testing

  • In the tests folder, there are now unit tests for all of the library's JavaScript plugins as well as its core functionality, that work with both Prism.js and highlight.js. Due to this, the codebase is now more stable, with many bugs fixed in the process, and pull requests in the future should be faster!
  • The library has also been optimised, so that despite the new features the core code-input.min.js has actually decreased in size!

🥳 Thank you so much to all of the contributors for this release - @andrelsm coded the go to line plugin and gave essential advice for performance optimisation as well as discussing a vital bugfix with @KaiWilke, @SArpnt helped with the nightmare that was browser inconsistency in Ctrl+F, and all 3 of them, @mitchcapper and @Ziqi-Yang returned to give advice on the auto-close brackets plugin.

Your help/suggestions/bugfixes/opinions would be deeply appreciated - to contribute anything please see the CONTRIBUTING.md guidance!


(I have spent a while to release this due to the large number of changes: I promise I will try to release versions more regularly in the future, and hopefully the automated tests should stop this from breaking anything!)