10.6.0
版本发布时间: 2021-02-08 21:26:05
highlightjs/highlight.js最新发布版本:11.10.0(2024-07-15 08:55:37)
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
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