From 397117028a90cd7d9bdd01db92894ee76c663ec2 Mon Sep 17 00:00:00 2001 From: Michael Rush Date: Mon, 2 Nov 2020 11:31:26 -0800 Subject: [PATCH] fix(vue) Corrected typo in Vue plugin setting detectedLanguage (#2807) * Corrected typo in Vue plugin setting detectedLanguage Fixed typo `this.detectectLanguage` -> `this.detectedLanguage` when rendering content when a language has been provided. In that case detectedLanguage was not getting set, which meant the computed className was also not getting the language. --- AUTHORS.txt | 1 + CHANGES.md | 7 ++++++- src/plugins/vue.js | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index ec9525f059..9c954ab64d 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -296,3 +296,4 @@ Contributors: - Fredrik Ekre - Jan Pilzer - Jonathan Sharpe +- Michael Rush diff --git a/CHANGES.md b/CHANGES.md index 87cdab2702..67b5ce4a78 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,10 @@ ## Version 10.4.0 (work in process) -New languages: +Parser: + +- fix(vue): Language name now appears in CSS class (#2807) [Michael Rush][] + +New Languages: - Added Chapel grammar to SUPPORTED_LANGUAGES (#2806) [Brad Chamberlain][] @@ -29,6 +33,7 @@ New themes: [Taufik Nurrohman]: https://github.com/taufik-nurrohman [Jan Pilzer]: https://github.com/Hirse [Jonathan Sharpe]: https://github.com/textbook +[Michael Rush]: https://github.com/rushimusmaximus ## Version 10.3.1 diff --git a/src/plugins/vue.js b/src/plugins/vue.js index dee6e833a4..e61346fab2 100644 --- a/src/plugins/vue.js +++ b/src/plugins/vue.js @@ -33,7 +33,7 @@ export const Component = { this.detectedLanguage = result.language; } else { result = hljs.highlight(this.language, this.code, this.ignoreIllegals); - this.detectectLanguage = this.language; + this.detectedLanguage = this.language; } return result.value; },