Better log on if language hint was provided
This commit is contained in:
parent
faac1936a9
commit
41d7feb4df
1 changed files with 5 additions and 1 deletions
|
@ -109,7 +109,11 @@ function createStringPasteUi(data, mimeType: string, name?: string, lang?: strin
|
||||||
let languages = undefined;
|
let languages = undefined;
|
||||||
|
|
||||||
if (!hljs.getLanguage(lang)) {
|
if (!hljs.getLanguage(lang)) {
|
||||||
|
if (lang) {
|
||||||
console.warn(`[js] User provided language (${lang}) is not known.`);
|
console.warn(`[js] User provided language (${lang}) is not known.`);
|
||||||
|
} else {
|
||||||
|
console.info(`[js] Language hint not provided.`);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
languages = [lang];
|
languages = [lang];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue