mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 10:27:32 -06:00
Implement fix for #3065
This commit is contained in:
@@ -95,13 +95,13 @@ export class FormattingHandler {
|
||||
try {
|
||||
// Perform the actual formatting
|
||||
const result = await formatter.format(req.body.source, {
|
||||
useSpaces: req.body.useSpaces,
|
||||
tabWidth: req.body.tabWidth,
|
||||
useSpaces: req.body.useSpaces ? req.body.useSpaces : true,
|
||||
tabWidth: req.body.tabWidth ? req.body.tabWidth: 4,
|
||||
baseStyle: req.body.base,
|
||||
});
|
||||
res.send({
|
||||
exit: result.code,
|
||||
answer: result.stdout || '',
|
||||
answer: result.stdout || result.stderr || '',
|
||||
});
|
||||
} catch (err) {
|
||||
res.status(500).send({
|
||||
|
||||
Reference in New Issue
Block a user