Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat code #15659

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,10 @@ private IEnumerable<CompletionItem> GetACRPartialPathCompletionsFromBicepConfig(
// br:mcr.microsoft.com/bicep/:<CURSOR>
private IEnumerable<CompletionItem> GetPublicModuleCompletions(string replacementText, BicepCompletionContext context)
{
var (prefix, suffix) = replacementText switch {
{} x when x.StartsWith("'br/public:", StringComparison.Ordinal) => ("'br/public:", x["'br/public:".Length..].TrimEnd('\'')),
{} x when x.StartsWith($"'br:{PublicMCRRegistry}/bicep/", StringComparison.Ordinal) => ($"'br:{PublicMCRRegistry}/bicep/", x[$"'br:{PublicMCRRegistry}/bicep/".Length..].TrimEnd('\'')),
var (prefix, suffix) = replacementText switch
{
{ } x when x.StartsWith("'br/public:", StringComparison.Ordinal) => ("'br/public:", x["'br/public:".Length..].TrimEnd('\'')),
{ } x when x.StartsWith($"'br:{PublicMCRRegistry}/bicep/", StringComparison.Ordinal) => ($"'br:{PublicMCRRegistry}/bicep/", x[$"'br:{PublicMCRRegistry}/bicep/".Length..].TrimEnd('\'')),
_ => (null, null),
};

Expand Down
4 changes: 2 additions & 2 deletions src/vscode-bicep/src/panes/deploy/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class DeployPaneView extends Disposable {
Environment.ChinaCloud,
Environment.GermanCloud,
Environment.USGovernment,
].map(env => env.resourceManagerEndpointUrl);
].map((env) => env.resourceManagerEndpointUrl);

return `
<!DOCTYPE html>
Expand All @@ -268,7 +268,7 @@ export class DeployPaneView extends Disposable {
Use a content security policy to only allow loading images from our extension directory,
and only allow scripts that have a specific nonce.
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' ${armEndpoints.join(' ')}; style-src ${cspSource} 'unsafe-inline'; img-src ${cspSource} data:; script-src 'nonce-${nonce}' vscode-webview-resource:; font-src data: ${cspSource};">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' ${armEndpoints.join(" ")}; style-src ${cspSource} 'unsafe-inline'; img-src ${cspSource} data:; script-src 'nonce-${nonce}' vscode-webview-resource:; font-src data: ${cspSource};">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="vscode-codicon-stylesheet" rel="stylesheet" nonce="${nonce}" href="${codiconCssUri}">
</head>
Expand Down
2 changes: 1 addition & 1 deletion src/vscode-bicep/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const extensionConfig: webpack.Configuration = {
to: path.join(__dirname, "out/deploy-pane"),
globOptions: {
ignore: ["**/index.html"],
}
},
},
],
}),
Expand Down
Loading