Skip to content

Commit 899ba17

Browse files
authored
Create a setting to suppress readme tabs (#4292)
* Create a setting to suppress readme tabs * Erase double quote * ;
1 parent 64e387a commit 899ba17

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,11 @@
11071107
"type": "boolean",
11081108
"description": "%azureFunctions.showFlexEventGridWarning%",
11091109
"default": true
1110+
},
1111+
"azureFunctions.showMarkdownPreview": {
1112+
"type": "boolean",
1113+
"description": "%azureFunctions.showMarkdownPreview%",
1114+
"default": true
11101115
}
11111116
}
11121117
}

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"azureFunctions.viewCommitInGitHub": "View Commit in GitHub",
110110
"azureFunctions.viewDeploymentLogs": "View Deployment Logs",
111111
"azureFunctions.viewProperties": "View Properties",
112+
"azureFunctions.showMarkdownPreview": "Enables showing the markdown preview after creating a new PythonV2 template",
112113
"azureFunctions.eventGrid.sendMockRequest": "Save and execute...",
113114
"azureFunctions.walkthrough.functionsStart.create.description": "If you're just getting started, you will need to create an Azure Functions project. Follow along with the [Visual Studio Code developer guide](https://aka.ms/functions-getstarted-vscode) for step-by-step instructions.\n[Create New Project](command:azureFunctions.createNewProject)",
114115
"azureFunctions.walkthrough.functionsStart.create.title": "Create a new Azure Functions project",

src/commands/createFunction/actionStepsV2/ShowMarkdownPreviewExecuteStep.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { nonNullProp } from "@microsoft/vscode-azext-utils";
77
import { assertTemplateIsV2 } from "../../../utils/templateVersionUtils";
88
import { showMarkdownPreviewContent } from "../../../utils/textUtils";
9+
import { getWorkspaceSetting } from "../../../vsCodeConfig/settings";
910
import { type FunctionV2WizardContext } from "../IFunctionWizardContext";
1011
import { ActionSchemaStepBase } from "./ActionSchemaStepBase";
1112

@@ -17,4 +18,8 @@ export class ShowMarkdownPreviewExecuteStep<T extends FunctionV2WizardContext> e
1718
const content = context.functionTemplate.files[filename] ?? '';
1819
await showMarkdownPreviewContent(content, filename, /* openToSide: */ true);
1920
}
21+
22+
public shouldExecute(_context: T): boolean {
23+
return !!getWorkspaceSetting('showMarkdownPreview');
24+
}
2025
}

0 commit comments

Comments
 (0)