From c75c14c239aa6be22256d21b852a3e213be4ef8f Mon Sep 17 00:00:00 2001 From: Chiel van de Steeg Date: Fri, 26 Jul 2024 15:15:49 +0200 Subject: [PATCH 1/2] Update CHANGES.md --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 9968ab83be..d84c96801a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -82,6 +82,7 @@ Core Grammars: - enh(css) add `select`, `option`, `optgroup`, `picture` and `source` to list of known tags [Vasily Polovnyov][] - enh(css) add `inset`, `inset-*`, `border-start-*-radius` and `border-end-*-radius` attributes [Vasily Polovnyov][] - enh(css) add `text-decoration-skip-ink`, `text-decoration-thickness` and `text-underline-offset` attributes [Vasily Polovnyov][] +- enh(java) add `when` to be recognized as a keyword in Java [Chiel van de Steeg][] New Grammars: @@ -140,6 +141,7 @@ Themes: [Julien Bloino]: https://github.com/jbloino [Sierra]: https://github.com/casuallyblue [Vlad Dimov]: https://github.com/DevDimov +[Chiel van de Steeg]: https://github.com/cvdsteeg From 36c06a916f98b74de1d3c7d6bf69aa5a75158926 Mon Sep 17 00:00:00 2001 From: Chiel van de Steeg Date: Fri, 26 Jul 2024 15:16:30 +0200 Subject: [PATCH 2/2] add when as a java keyword --- src/languages/java.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/languages/java.js b/src/languages/java.js index a0e5d4cf9a..b826eb94cf 100644 --- a/src/languages/java.js +++ b/src/languages/java.js @@ -75,7 +75,8 @@ export default function(hljs) { 'sealed', 'yield', 'permits', - 'goto' + 'goto', + 'when' ]; const BUILT_INS = [