Skip to content

Commit

Permalink
enh(java) class definitions could start with keyword enum (#2643)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoleobun authored Aug 3, 2020
1 parent 8dcdddd commit a2a7db5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/languages/java.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down

0 comments on commit a2a7db5

Please sign in to comment.