Skip to content

Releases: scrivo/highlight.php

Version 9.18.1.10

17 Dec 21:56
850f4b4
Compare
Choose a tag to compare

A holiday maintenance release to fix support for PHP 8.2

Fixes

  • Declare previous dynamic properties by @phpfui in #102

Version 9.18.1.9

24 Dec 01:32
d455855
Compare
Choose a tag to compare

Fixes

  • Silence deprecation warnings in PHP 8.1 (#94, #95)

Version 9.18.1.8

24 Oct 00:36
6d5049c
Compare
Choose a tag to compare

Changes

  • Drop mbstring as a hard dependency for the project, which was only used for matching Unicode keywords in languages like 1C. Unless the code being highlighted contains Unicode characters, then we'll default to the faster, normal str* functions (#92)

Version 9.18.1.7

09 Jul 00:59
05996fc
Compare
Choose a tag to compare

Fixes

Version 9.18.1.6

22 Dec 19:22
44a3d41
Compare
Choose a tag to compare

Fixes

  • Rewrite splitCodeIntoArray yet again to fix more edge cases and have 3x the speed (#85)
    • The ext-dom suggested requirement has been dropped
    • This function no longer throws RuntimeException or UnexpectedValueException

Thanks to @westonruter for the help on this release 🎉

Version 9.18.1.5

22 Nov 06:11
fa75a86
Compare
Choose a tag to compare

Fixes

  • The RegEx class received a ~267% speed increase after receiving a huge performance hit after v9.16.2.0 (#78, #84)

Version 9.18.1.4

01 Nov 04:18
ee8007a
Compare
Choose a tag to compare

New

  • Add new $loadAllLanguages parameter to Highlighter constructor to opt-out of automatic language registration. If you opt-out, you must call Highlighter::registerLanguage() for each language that you want.
  • Now that language registration can be opted out of, Highlighter::registerAllLanguages() has been made public to allow registering all bundled languages if you change your mind.
  • Add Highlighter::clearAllLanguages() to allow clearing registered languages
  • Add two new utility functions to HighlightUtilities:
    • getLanguagesFolder() - get the file path to the bundled languages folder
    • getLanguageDefinitionPath() - get the file path to a specific bundled language definition
  • Add new Highlighter::listBundledLanguages() function
  • Add new Highlighter::listRegisteredLanguages() function

Fixes

  • Fix Highlighter::listLanguages() not getting correctly updated when custom languages were registered

Deprecations

  • Deprecated Highlighter::listLanguages(), use listBundledLanguages() or listRegisteredLanguages() instead

Version 9.18.1.3

16 Oct 15:26
6a16997
Compare
Choose a tag to compare

Fixes

  • splitCodeIntoArray() now generates valid HTML when there are nested <span> tags in the highlighted code (#79)
  • splitCodeIntoArray() no longer throws a warning when an empty string was given as a parameter (#80)

Version 9.18.1.2

27 Aug 03:28
efb6e44
Compare
Choose a tag to compare

Fixes

  • Fix UTF-8 characters being broken when given to \HighlightUtilities\splitCodeIntoArray() (#76)

Version 9.18.1.1

02 Mar 06:01
52fc21c
Compare
Choose a tag to compare

New

  • Added new getThemeBackgroundColor(string $name) utility function (#69)