From d6fe29ed74a3ff477bdd8fb1a46ce4753053ee45 Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Mon, 21 Sep 2020 09:07:44 -0400 Subject: [PATCH 1/2] fix(c-like) Correctly highlight modifiers in class declaration (#2696) --- CHANGES.md | 1 + src/languages/c-like.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 4fbec70be6..d27d185303 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,7 @@ Language Improvements: - fix(csharp) prevent modifier keywords wrongly flagged as `title` (#2683) [Josh Goebel][] - enh(axapta) Update keyword list for Axapta (X++) (#2686) [Ryan Jonasson][] - fix(fortran) FORTRAN 77-style comments (#2677) [Philipp Engel][] +- fix(c-like) Correctly highlight modifiers in class declaration (#2696) [Josh Goebel][] [David Pine]: https://github.com/IEvangelist [Josh Goebel]: https://github.com/yyyc514 diff --git a/src/languages/c-like.js b/src/languages/c-like.js index 11fad83a89..cfc040c7fb 100644 --- a/src/languages/c-like.js +++ b/src/languages/c-like.js @@ -226,6 +226,7 @@ export default function(hljs) { className: 'class', beginKeywords: 'class struct', end: /[{;:]/, contains: [ + { beginKeywords: "final" }, {begin: //, contains: ['self']}, // skip generic stuff hljs.TITLE_MODE ] From 1e0cee4e792ed3cf98779a5a98195e5872e40b39 Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Tue, 22 Sep 2020 11:22:20 -0400 Subject: [PATCH 2/2] Update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d27d185303..bfb4557be0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,7 +9,7 @@ Language Improvements: - fix(csharp) prevent modifier keywords wrongly flagged as `title` (#2683) [Josh Goebel][] - enh(axapta) Update keyword list for Axapta (X++) (#2686) [Ryan Jonasson][] - fix(fortran) FORTRAN 77-style comments (#2677) [Philipp Engel][] -- fix(c-like) Correctly highlight modifiers in class declaration (#2696) [Josh Goebel][] +- fix(c-like) Correctly highlight modifiers (`final`) in class declaration (#2696) [Josh Goebel][] [David Pine]: https://github.com/IEvangelist [Josh Goebel]: https://github.com/yyyc514