Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Apr 23, 2024
1 parent c99c5c4 commit c5a5ed9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/InstructionsWithCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ export function ShellBlock(content, value = "shell", label = "Shell") {
* @returns {string} The formatted code
*/
function formatCode(code, language) {
language = language.toLowerCase();
if (language === "python") {
const languageLower = language.toLowerCase();
if (languageLower === "python") {
// no-op - Do not format Python code at this time
return code;
}

try {
const formattedCode = prettier.format(code, {
parser: language,
parser: languageLower,
plugins: [parserTypeScript],
});

Expand Down

0 comments on commit c5a5ed9

Please sign in to comment.