highlight.js v10.6.0 Release Notes
-
๐ New Languages:
- โ Added 3rd party Laravel Blade grammar to SUPPORTED_LANGUAGES (#2944) Michael Newton
Language grammar improvements:
- enh(scala) fix triple quoted strings (#2987) Josh Goebel
- enh(perl) Much improved regex detection (#2960) Josh Goebel
- enh(swift) Improved highlighting for operator and precedencegroup declarations. (#2938) Steven Van Impe
- ๐ fix(xml) Support single-character namespaces. (#2957) Jan Pilzer
- ๐ enh(ruby) Support for character literals (#2950) Vaibhav Chanana
- โก๏ธ enh(powershell) Add three VALID_VERBS and update the reference link (#2981) davidhcefx
- ๐ fix(php) Highlighting of anonymous functions without {} block Vaibhav Chanana
๐ Grammar Deprecations:
- ๐ Deprecate
c-like
, though you should not be using it directly anyways.- will be removed in v11.
c
andcpp
are now wholly unique grammars that will diverge over time
๐ Parser:
- ๐ new simpler
highlightAll()
API (#2962) Josh Goebel- this should be a drop-in replacement for both
initHighlighting()
andinitHighlightingOnLoad()
- note: it does not prevent itself from being called multiple times (as the previous API did)
- this should be a drop-in replacement for both
beginKeyword
no longer bestows double relevance (#2953) Josh Goebel- ๐ allow
keywords
to be an array of strings Josh Goebel - add
modes.MATCH_NOTHING_RE
that will never match- This can be used with
end
to hold a mode open (it must then be ended withendsParent
in one of it's children modes) Josh Goebel
- This can be used with
๐ Deprecations:
- ๐
initHighlighting()
andinitHighlightingOnLoad()
deprecated.- Please use the new
highlightAll()
API instead. - Deprecated as of 10.6.
- These will both be aliases to
highlightAll
in v11.
- Please use the new