From 3ea507f13311c431e99f5c41db1aadf7f0ad4c77 Mon Sep 17 00:00:00 2001 From: ezksd Date: Sun, 2 Aug 2020 15:17:25 +0800 Subject: [PATCH 1/2] class definitions could start with keyword enum ... --- src/languages/java.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/java.js b/src/languages/java.js index 395a80d86a..13ae1c5fc2 100644 --- a/src/languages/java.js +++ b/src/languages/java.js @@ -98,8 +98,8 @@ export default function(hljs) { hljs.QUOTE_STRING_MODE, { className: 'class', - beginKeywords: 'class interface', end: /[{;=]/, excludeEnd: true, - keywords: 'class interface', + beginKeywords: 'class interface enum', end: /[{;=]/, excludeEnd: true, + keywords: 'class interface enum', illegal: /[:"\[\]]/, contains: [ { beginKeywords: 'extends implements' }, From 5de6a6b99369601c9074737af45fad5974b5aa58 Mon Sep 17 00:00:00 2001 From: ezksd Date: Mon, 3 Aug 2020 09:10:06 +0800 Subject: [PATCH 2/2] update changes.md --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index c641b19cfd..27f3dae26c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,11 +9,13 @@ Language Improvements: - enh(matlab) Add new R2019b `arguments` keyword and fix `enumeration` keyword (#2619) [Andrew Janke][] - fix(kotlin) Remove very old keywords and update example code (#2623) [kageru][] - fix(night) Prevent object prototypes method values from being returned in `getLanguage` (#2636) [night][] +- enh(java) Add support for `enum`, which will identify as a `class` now (#2643) [ezksd][] [Andrew Janke]: https://github.com/apjanke [Samia Ali]: https://github.com/samiaab1990 [kageru]: https://github.com/kageru [night]: https://github.com/night +[ezksd]: https://github.com/ezksd ## Version 10.1.1