Skip to content

Commit a2a7db5

Browse files
authored
enh(java) class definitions could start with keyword enum (highlightjs#2643)
1 parent 8dcdddd commit a2a7db5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ Language Improvements:
99
- enh(matlab) Add new R2019b `arguments` keyword and fix `enumeration` keyword (#2619) [Andrew Janke][]
1010
- fix(kotlin) Remove very old keywords and update example code (#2623) [kageru][]
1111
- fix(night) Prevent object prototypes method values from being returned in `getLanguage` (#2636) [night][]
12+
- enh(java) Add support for `enum`, which will identify as a `class` now (#2643) [ezksd][]
1213

1314
[Andrew Janke]: https://github.com/apjanke
1415
[Samia Ali]: https://github.com/samiaab1990
1516
[kageru]: https://github.com/kageru
1617
[night]: https://github.com/night
18+
[ezksd]: https://github.com/ezksd
1719

1820

1921
## Version 10.1.1

src/languages/java.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ export default function(hljs) {
9898
hljs.QUOTE_STRING_MODE,
9999
{
100100
className: 'class',
101-
beginKeywords: 'class interface', end: /[{;=]/, excludeEnd: true,
102-
keywords: 'class interface',
101+
beginKeywords: 'class interface enum', end: /[{;=]/, excludeEnd: true,
102+
keywords: 'class interface enum',
103103
illegal: /[:"\[\]]/,
104104
contains: [
105105
{ beginKeywords: 'extends implements' },

0 commit comments

Comments
 (0)