Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1f3018e

Browse files
author
Akos Kitta
committed
ecaped json for win.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 0ab3c36 commit 1f3018e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎arduino-ide-extension/src/node/clang-formatter.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class ClangFormatter implements Formatter {
7575
);
7676
return `-style=file:"${first}"`;
7777
}
78-
return `-style='${style(toClangOptions(options))}'`;
78+
return `-style="${style(toClangOptions(options))}"`;
7979
}
8080

8181
private async dataDirPath(): Promise<string> {
@@ -123,7 +123,7 @@ function toClangOptions(
123123

124124
// See: https://releases.llvm.org/11.0.1/tools/clang/docs/ClangFormatStyleOptions.html
125125
export function style({ TabWidth, UseTab }: ClangFormatOptions): string {
126-
return JSON.stringify(styleJson({ TabWidth, UseTab }));
126+
return JSON.stringify(styleJson({ TabWidth, UseTab })).replace(/\"/g,'\\"');
127127
}
128128

129129
function styleJson({

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /