Releases: scrivo/highlight.php
Releases · scrivo/highlight.php
Version 9.18.1.10
Version 9.18.1.9
Version 9.18.1.8
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, normalstr*
functions (#92)
Version 9.18.1.7
Fixes
- Fix characters being duplicated or eaten up when the code being highlighted contains Unicode characters (westonruter/syntax-highlighting-code-block#400, #87, #90)
Version 9.18.1.6
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
orUnexpectedValueException
- The
Thanks to @westonruter for the help on this release 🎉
Version 9.18.1.5
Version 9.18.1.4
New
- Add new
$loadAllLanguages
parameter to Highlighter constructor to opt-out of automatic language registration. If you opt-out, you must callHighlighter::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 foldergetLanguageDefinitionPath()
- 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()
, uselistBundledLanguages()
orlistRegisteredLanguages()
instead
Version 9.18.1.3
Version 9.18.1.2
Fixes
- Fix UTF-8 characters being broken when given to
\HighlightUtilities\splitCodeIntoArray()
(#76)
Version 9.18.1.1
New
- Added new
getThemeBackgroundColor(string $name)
utility function (#69)