diff --git a/CHANGES.md b/CHANGES.md index b1413c29a5..3cbd9e1dee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -26,6 +26,7 @@ Core Grammars: - enh(json) add json5 support [Kerry Shetline][] - fix(css) `unicode-range` parsing, issue #4253 [Kerry Shetline][] - fix(csharp) Support digit separators [te-ing][] +- enh(python) correctly highlight `lazy import` syntax from PEP 810 [Peter Bierma][] Documentation: @@ -55,6 +56,7 @@ CONTRIBUTORS [te-ing]: https://github.com/te-ing [Anthony Martin]: https://github.com/anthony-c-martin [NriotHrreion]: https://github.com/NriotHrreion +[Peter Bierma]: https://github.com/ZeroIntensity ## Version 11.11.1 diff --git a/src/languages/python.js b/src/languages/python.js index 2604889790..5c457a1003 100644 --- a/src/languages/python.js +++ b/src/languages/python.js @@ -32,6 +32,7 @@ export default function(hljs) { 'in', 'is', 'lambda', + 'lazy', 'match', 'nonlocal|10', 'not', diff --git a/test/markup/python/lazy-import.expect.txt b/test/markup/python/lazy-import.expect.txt new file mode 100644 index 0000000000..e1a5f56dd7 --- /dev/null +++ b/test/markup/python/lazy-import.expect.txt @@ -0,0 +1,2 @@ +lazy import foo +lazy from foo import bar diff --git a/test/markup/python/lazy-import.txt b/test/markup/python/lazy-import.txt new file mode 100644 index 0000000000..5eed07db70 --- /dev/null +++ b/test/markup/python/lazy-import.txt @@ -0,0 +1,2 @@ +lazy import foo +lazy from foo import bar