Version 10.7.2
This is a patch release. The only change is that deprecation messages are throttled and shown only once.
- (chore) throttle deprecation messages (#3092) Mihkel Eidast
Syntax highlighting for the Web
@requires_authorization(roles=["ADMIN"])
def somefunc(param1='', param2=0):
r'''A docstring'''
if param1 > param2: # interesting
print 'Gre\'ater'
return (param2 - param1 + 1 + 0b10l) or None
class SomeClass:
pass
>>> message = '''interpreter
... prompt'''
Version 10.7.2
This is a patch release. The only change is that deprecation messages are throttled and shown only once.
Version 10.7.1
Parser:
unregisterLanguage
method (#3009) Antoine du HamelhighlightAll()
now works if the library is lazy loaded Josh GoebelNew Languages:
Language grammar improvements:
defined?()
mis-highlighted as def
(#3025) Josh Goebel#include <str>
blocks (#3041) Josh Goebel#include <str>
blocks (#3041) Josh Goebeltrait
to class-like naming patterns (#2997) AyeshStringable
, UnhandledMatchError
, and WeakMap
classes/interfaces (#2997) Ayeshmixed
to list of keywords (#2997) Ayeshkts
as an alias for Kotlin (#3021) Vaibhav Chananafont-smoothing
to attributes list for CSS (#3027) AndyKIronprint
and exec
as a builtin (#1468) Samuel ColvinDeprecations:
highlight(languageName, code, ignoreIllegals, continuation)
deprecated as of 10.7
code
and then accepts options as an objecthighlight(code, {language, ignoreIllegals})
continuation
is for internal use only and no longer supportedhighlightBlock(el)
deprecated as of 10.7.
highlightElement(el)
instead.before/after:highlightBlock
=> before/after:highlightElement
el
vs block
attributeVersion 10.7.0
Parser:
unregisterLanguage
method (#3009) Antoine du HamelhighlightAll()
now works if the library is lazy loaded Josh GoebelNew Languages:
Language grammar improvements:
defined?()
mis-highlighted as def
(#3025) Josh Goebel#include <str>
blocks (#3041) Josh Goebel#include <str>
blocks (#3041) Josh Goebeltrait
to class-like naming patterns (#2997) AyeshStringable
, UnhandledMatchError
, and WeakMap
classes/interfaces (#2997) Ayeshmixed
to list of keywords (#2997) Ayeshkts
as an alias for Kotlin (#3021) Vaibhav Chananafont-smoothing
to attributes list for CSS (#3027) AndyKIronprint
and exec
as a builtin (#1468) Samuel ColvinDeprecations:
highlight(languageName, code, ignoreIllegals, continuation)
deprecated as of 10.7
code
and then accepts options as an objecthighlight(code, {language, ignoreIllegals})
continuation
is for internal use only and no longer supportedhighlightBlock(el)
deprecated as of 10.7.
highlightElement(el)
instead.before/after:highlightBlock
=> before/after:highlightElement
el
vs block
attributeVersion 10.6.0
New Languages:
Language grammar improvements:
Grammar Deprecations:
c-like
, though you should not be using it directly anyways.
c
and cpp
are now wholly unique grammars that will diverge over timeParser:
highlightAll()
API (#2962) Josh Goebel
initHighlighting()
and initHighlightingOnLoad()
beginKeyword
no longer bestows double relevance (#2953) Josh Goebelkeywords
to be an array of strings Josh Goebelmodes.MATCH_NOTHING_RE
that will never match
end
to hold a mode open (it must then be ended with endsParent
in one of it's children modes) Josh GoebelDeprecations:
initHighlighting()
and initHighlightingOnLoad()
deprecated.
highlightAll()
API instead.highlightAll
in v11.Version 10.5.0
Build:
cdn-assets
Josh Goebel:common
) Josh GoebelParser:
match
as sugar for simple begin
only matches (#2834) Josh Goebelillegal
to also be an array of regex (#2834) Josh GoebelcompilerExtensions
allows grammers to influence mode compilation (#2834) Josh Goebel
New Languages:
Language grammar improvements:
make
as an alias (#2883) tripleee[]
for argument lists (#2913) Josh GoebelREM
comments and fixes '''
doctags (#2875) (#2851)
Enable
, Disable
, and Then
keywordsRecent Deprecations:
<pre>
blocks will no longer be magically merged back into the
highlighted code's HTML result - it will instead be silently removed.tabReplace
option deprecated. (#2873) Josh Goebel
tab-size
property, or simply pre-process the
text yourself before rendering the initial HTMLuseBR
option deprecated. (#2559) Josh Goebel
<pre>
tagwhite-space: pre;
requireLanguage
API is deprecated, will be removed in v11.0.
getLanguage
(with custom error handling) or built-time dependencies.Version 10.4.1
Security
Very grateful to Michael Schmidt for all the help.
Version 10.4.0
A largish release with many improvements and fixes from quite a few different contributors. Enjoy!
Deprecations:
requireLanguage
is deprecated.
getLanguage
(with custom error handling) or built-time dependencies.Parser:
beginKeywords
support (#2813) Josh GoebelclassNameAliases
for more complex grammars Josh GoebelNew Languages:
node-repl
for Node.js REPL sessions (#2792) Marat NagayevLanguage Improvements:
~
(#2859) Guillaume Grossetie\
(#2861) Guillaume Grossetie\[Gamma]
#
Marcus Ortizsome
keyword Marcus Ortiz@main
attribute Marcus OrtizDev Improvements:
New themes:
Version 10.3.2
Tiny tiny release, just to fix the website incorrectly not listing Javascript in the list of languages you could choose for a custom build.
Version 10.3.1
Prior version let some look-behind regex sneak in, which does not work yet on Safari. This release removes those incompatible regexes.
Fix:
Version 10.3.0
Language Improvements:
enum (struct|class)
and union
(#2752) Josh Goebel{}
inside template literals SUBST expression (#2748) Josh Goebelconstructor
is now highlighted as a function title (not keyword) (#2727) Josh Goebel#
for private class fields (#2701) Chris Krycho(*)
from being detected as a multi-line comment Josh Goebelobjective-c++
and obj-c++
aliases for Objective-C Josh Goebelrecord
(#2685) Josh Goebeltitle
(#2683) Josh Goebelfinal
) in class declaration (#2696) Josh Goebelmatch
keyword and add php8
as an alias (#2733) Ayesh KarunaratneDeprecations:
useBR
option deprecated and will be removed in v11.0. (#2559) Josh Goebel
@highlightjs