Skip to content

Commit

Permalink
Allow custom label without a language mapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswells0 committed Dec 13, 2015
1 parent 05a2a15 commit 89f9b11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/show-language/prism-show-language.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Prism.hooks.add('before-highlight', function(env) {
if (!pre || !/pre/i.test(pre.nodeName)) {
return;
}
var language = Languages[env.language] || (env.language.substring(0, 1).toUpperCase() + env.language.substring(1));
var language = env.element.getAttribute('data-language-label') || Languages[env.language] || (env.language.substring(0, 1).toUpperCase() + env.language.substring(1));
pre.setAttribute('data-language', language);

/* check if the divs already exist */
Expand Down

0 comments on commit 89f9b11

Please sign in to comment.