Skip to content

Commit

Permalink
[docs] Force usage of block language (#18069)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsmfm authored and oliviertassinari committed Oct 29, 2019
1 parent e168bc6 commit 751ea52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ const markedOptions = {
}

if (!prismLanguage) {
if (language) {
throw new Error(`unsuppored language: "${language}", "${code}"`);
if (process.env.NODE_ENV === 'production') {
console.error(`unsuppored language: "${language}", "${code}"`);
} else {
prismLanguage = prism.languages.jsx;
throw new Error(`unsuppored language: "${language}", "${code}"`);
}
}

Expand Down

0 comments on commit 751ea52

Please sign in to comment.