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

doc: fix Windows code snippet tags #48100

Merged
merged 1 commit into from
May 21, 2023
Merged
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
8 changes: 4 additions & 4 deletions doc/api/single-executable-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ tool, [postject][]:

Using PowerShell:

```bash
```powershell
cp (Get-Command node).Source hello.exe
```

Using Command Prompt:

```bash
```text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```text
```cmd

Shouldn't this be cmd?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter won’t let me do that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so here's the total list:

node/tools/lint-md/lint-md.mjs

Lines 20828 to 20843 in 260092e

"bash",
"c",
"cjs",
"coffee",
"console",
"cpp",
"diff",
"http",
"js",
"json",
"markdown",
"mjs",
"powershell",
"r",
"text",
"ts",

I think console still makes more sense than text here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree, console is meant for showing the output of commands (with optionally the command themselves when prefixed with $ or >), so it wouldn’t apply here. If you feel strongly that text is not correct, let’s add cmd to the list.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly about it :)

for /F "tokens=*" %n IN ('where.exe node') DO @(copy "%n" hello.exe)
```

Expand All @@ -79,7 +79,7 @@ tool, [postject][]:
[signtool][] can be used from the installed [Windows SDK][]. If this step is
skipped, ignore any signature-related warning from postject.

```bash
```powershell
signtool remove /s hello.exe
```

Expand Down Expand Up @@ -131,7 +131,7 @@ tool, [postject][]:
A certificate needs to be present for this to work. However, the unsigned
binary would still be runnable.

```bash
```powershell
signtool sign /fd SHA256 hello.exe
```

Expand Down