Skip to content

Commit 921d36d

Browse files
authored
Fix markdown ordered lists (PowerShell#12657)
# PR Summary * Replace an ordered list with sections * Fix an ordered list to continue numbering in each item ## PR Context <!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. --> ## PR Checklist - [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission) - Use the present tense and imperative mood when describing your changes - [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission) - [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission) - [x] This PR is ready to merge and is not [Work in Progress](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress). - If the PR is work in progress, please add the prefix `WIP:` or `[ WIP ]` to the beginning of the title (the `WIP` bot will keep its status check at `Pending` while the prefix is present) and remove the prefix when the PR is ready. - **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)** - [x] None - **OR** - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/staging/reference/6/Microsoft.PowerShell.Core/About/about_Experimental_Features.md) - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here --> - **User-facing changes** - [x] Not Applicable - **OR** - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission) - [ ] Issue filed: <!-- Number/link of that issue here --> - **Testing - New and feature** - [x] N/A or can only be tested interactively - **OR** - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting) - **Tooling** - [x] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted. - **OR** - [ ] I have considered the user experience from a tooling perspective and enumerated concerns in the summary. This may include: - Impact on [PowerShell Editor Services](https://github.com/PowerShell/PowerShellEditorServices) which is used in the [PowerShell extension](https://github.com/PowerShell/vscode-powershell) for VSCode (which runs in a different PS Host). - Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features. - Impact on [PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer) (which provides linting & formatting in the editor extensions). - Impact on [EditorSyntax](https://github.com/PowerShell/EditorSyntax) (which provides syntax highlighting with in VSCode, GitHub, and many other editors).
1 parent fdb2b2a commit 921d36d

2 files changed

Lines changed: 133 additions & 133 deletions

File tree

docs/learning-powershell/debugging-from-commandline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $result =[int](ConvertFahrenheitToCelsius($fahrenheit))
2020
Write-Host "$result Celsius"
2121
```
2222

23-
1. **Setting a Breakpoint on a Line**
23+
## Setting a Breakpoint on a Line
2424

2525
- Open a [PowerShell editor](README.md#powershell-editor)
2626
- Save the above code snippet to a file. For example, "test.ps1"
@@ -103,7 +103,7 @@ PS /home/jen/debug>
103103
104104
```
105105

106-
1. **Setting a Breakpoint on a Variable**
106+
## Setting a Breakpoint on a Variable
107107
- Clear existing breakpoints if there are any
108108

109109
```powershell

docs/learning-powershell/powershell-beginners-guide.md

Lines changed: 131 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -26,205 +26,205 @@ It is shown as `PS C:\>` on Windows.
2626

2727
1. `Get-Process`: Gets the processes that are running on the local computer or a remote computer.
2828

29-
By default, you will get data back similar to the following:
29+
By default, you will get data back similar to the following:
3030

31-
```powershell
32-
PS /> Get-Process
31+
```powershell
32+
PS /> Get-Process
3333
34-
Handles NPM(K) PM(K) WS(K) CPU(s) Id ProcessName
35-
------- ------ ----- ----- ------ -- -----------
36-
- - - 1 0.012 12 bash
37-
- - - 21 20.220 449 powershell
38-
- - - 11 61.630 8620 code
39-
- - - 74 403.150 1209 firefox
34+
Handles NPM(K) PM(K) WS(K) CPU(s) Id ProcessName
35+
------- ------ ----- ----- ------ -- -----------
36+
- - - 1 0.012 12 bash
37+
- - - 21 20.220 449 powershell
38+
- - - 11 61.630 8620 code
39+
- - - 74 403.150 1209 firefox
4040
41-
42-
```
41+
42+
```
4343
44-
Only interested in the instance of Firefox process that is running on your computer?
44+
Only interested in the instance of Firefox process that is running on your computer?
4545
46-
Try this:
46+
Try this:
4747
48-
```powershell
49-
PS /> Get-Process -Name firefox
48+
```powershell
49+
PS /> Get-Process -Name firefox
5050
51-
Handles NPM(K) PM(K) WS(K) CPU(s) Id ProcessName
52-
------- ------ ----- ----- ------ -- -----------
53-
- - - 74 403.150 1209 firefox
51+
Handles NPM(K) PM(K) WS(K) CPU(s) Id ProcessName
52+
------- ------ ----- ----- ------ -- -----------
53+
- - - 74 403.150 1209 firefox
5454
55-
```
55+
```
5656
57-
Want to get back more than one process?
58-
Then just specify process names and separate them with commas.
57+
Want to get back more than one process?
58+
Then just specify process names and separate them with commas.
5959
60-
```powershell
61-
PS /> Get-Process -Name firefox, powershell
62-
Handles NPM(K) PM(K) WS(K) CPU(s) Id ProcessName
63-
------- ------ ----- ----- ------ -- -----------
64-
- - - 74 403.150 1209 firefox
65-
- - - 21 20.220 449 powershell
60+
```powershell
61+
PS /> Get-Process -Name firefox, powershell
62+
Handles NPM(K) PM(K) WS(K) CPU(s) Id ProcessName
63+
------- ------ ----- ----- ------ -- -----------
64+
- - - 74 403.150 1209 firefox
65+
- - - 21 20.220 449 powershell
6666
67-
```
67+
```
6868
6969
1. `Clear-Host`: Clears the display in the host program.
7070
71-
```powershell
72-
PS /> Get-Process
73-
PS /> Clear-Host
74-
```
71+
```powershell
72+
PS /> Get-Process
73+
PS /> Clear-Host
74+
```
7575
76-
Type too much just for clearing the screen?
76+
Type too much just for clearing the screen?
7777
78-
Here is how the alias can help.
78+
Here is how the alias can help.
7979
8080
1. `Get-Alias`: Gets the aliases for the current session.
8181
82-
```powershell
83-
Get-Alias
84-
85-
CommandType Name
86-
----------- ----
87-
88-
89-
Alias cd -> Set-Location
90-
Alias cls -> Clear-Host
91-
Alias clear -> Clear-Host
92-
Alias copy -> Copy-Item
93-
Alias dir -> Get-ChildItem
94-
Alias gc -> Get-Content
95-
Alias gmo -> Get-Module
96-
Alias ri -> Remove-Item
97-
Alias type -> Get-Content
98-
99-
```
82+
```powershell
83+
Get-Alias
10084
101-
As you can see `cls` or `clear` is an alias of `Clear-Host`.
85+
CommandType Name
86+
----------- ----
87+
10288
103-
Now try it:
89+
Alias cd -> Set-Location
90+
Alias cls -> Clear-Host
91+
Alias clear -> Clear-Host
92+
Alias copy -> Copy-Item
93+
Alias dir -> Get-ChildItem
94+
Alias gc -> Get-Content
95+
Alias gmo -> Get-Module
96+
Alias ri -> Remove-Item
97+
Alias type -> Get-Content
98+
99+
```
104100
105-
```powershell
106-
PS /> Get-Process
107-
PS /> cls
108-
```
101+
As you can see `cls` or `clear` is an alias of `Clear-Host`.
102+
103+
Now try it:
104+
105+
```powershell
106+
PS /> Get-Process
107+
PS /> cls
108+
```
109109
110110
1. `cd -> Set-Location`: Sets the current working location to a specified location.
111111
112-
```powershell
113-
PS /> Set-Location /home
114-
PS /home>
115-
```
112+
```powershell
113+
PS /> Set-Location /home
114+
PS /home>
115+
```
116116
117117
1. `dir -> Get-ChildItem`: Gets the items and child items in one or more specified locations.
118118
119-
```powershell
120-
# Get all files under the current directory:
121-
PS /> Get-ChildItem
119+
```powershell
120+
# Get all files under the current directory:
121+
PS /> Get-ChildItem
122122
123-
# Get all files under the current directory as well as its subdirectories:
124-
PS /> cd $home
125-
PS /home/jen> dir -Recurse
123+
# Get all files under the current directory as well as its subdirectories:
124+
PS /> cd $home
125+
PS /home/jen> dir -Recurse
126126
127-
# List all files with "txt" file extension.
128-
PS /> cd $home
129-
PS /home/jen> dir –Path *.txt -Recurse
130-
```
127+
# List all files with "txt" file extension.
128+
PS /> cd $home
129+
PS /home/jen> dir –Path *.txt -Recurse
130+
```
131131
132-
*6. `New-Item`: Creates a new item.
132+
1. `New-Item`: Creates a new item.
133133
134-
```powershell
135-
# An empty file is created if you type the following:
136-
PS /home/jen> New-Item -Path ./test.txt
134+
```powershell
135+
# An empty file is created if you type the following:
136+
PS /home/jen> New-Item -Path ./test.txt
137137
138138
139-
Directory: /home/jen
139+
Directory: /home/jen
140140
141141
142-
Mode LastWriteTime Length Name
143-
---- ------------- ------ ----
144-
-a---- 7/7/2016 7:17 PM 0 test.txt
145-
```
142+
Mode LastWriteTime Length Name
143+
---- ------------- ------ ----
144+
-a---- 7/7/2016 7:17 PM 0 test.txt
145+
```
146146
147-
You can use the `-Value` parameter to add some data to your file.
147+
You can use the `-Value` parameter to add some data to your file.
148148
149-
For example, the following command adds the phrase `Hello world!` as a file content to the `test.txt`.
149+
For example, the following command adds the phrase `Hello world!` as a file content to the `test.txt`.
150150
151-
Because the test.txt file exists already, we use `-Force` parameter to replace the existing content.
151+
Because the test.txt file exists already, we use `-Force` parameter to replace the existing content.
152152
153-
```powershell
154-
PS /home/jen> New-Item -Path ./test.txt -Value "Hello world!" -Force
153+
```powershell
154+
PS /home/jen> New-Item -Path ./test.txt -Value "Hello world!" -Force
155155
156-
Directory: /home/jen
156+
Directory: /home/jen
157157
158158
159-
Mode LastWriteTime Length Name
160-
---- ------------- ------ ----
161-
-a---- 7/7/2016 7:19 PM 24 test.txt
159+
Mode LastWriteTime Length Name
160+
---- ------------- ------ ----
161+
-a---- 7/7/2016 7:19 PM 24 test.txt
162162
163-
```
163+
```
164164
165-
There are other ways to add some data to a file.
165+
There are other ways to add some data to a file.
166166
167-
For example, you can use `Set-Content` to set the file contents:
167+
For example, you can use `Set-Content` to set the file contents:
168168
169-
```powershell
170-
PS /home/jen>Set-Content -Path ./test.txt -Value "Hello world again!"
171-
```
169+
```powershell
170+
PS /home/jen>Set-Content -Path ./test.txt -Value "Hello world again!"
171+
```
172172
173-
Or simply use `>` as below:
173+
Or simply use `>` as below:
174174
175-
```powershell
176-
# create an empty file
177-
"" > test.txt
175+
```powershell
176+
# create an empty file
177+
"" > test.txt
178178
179-
# set "Hello world!" as content of test.txt file
180-
"Hello world!!!" > test.txt
179+
# set "Hello world!" as content of test.txt file
180+
"Hello world!!!" > test.txt
181181
182-
```
182+
```
183183
184-
The pound sign `#` above is used for comments in PowerShell.
184+
The pound sign `#` above is used for comments in PowerShell.
185185
186186
1. `type -> Get-Content`: Gets the content of the item at the specified location.
187187
188-
```powershell
189-
PS /home/jen> Get-Content -Path ./test.txt
190-
PS /home/jen> type -Path ./test.txt
188+
```powershell
189+
PS /home/jen> Get-Content -Path ./test.txt
190+
PS /home/jen> type -Path ./test.txt
191191
192-
Hello world again!
193-
```
192+
Hello world again!
193+
```
194194
195195
1. `del -> Remove-Item`: Deletes the specified items.
196196
197-
This cmdlet will delete the file `/home/jen/test.txt`:
197+
This cmdlet will delete the file `/home/jen/test.txt`:
198198
199-
```powershell
200-
PS /home/jen> Remove-Item ./test.txt
201-
```
199+
```powershell
200+
PS /home/jen> Remove-Item ./test.txt
201+
```
202202
203203
1. `$PSVersionTable`: Displays the version of PowerShell you are currently using.
204204
205-
Type `$PSVersionTable` in your PowerShell session, you will see something like below.
206-
"PSVersion" indicates the PowerShell version that you are using.
205+
Type `$PSVersionTable` in your PowerShell session, you will see something like below.
206+
"PSVersion" indicates the PowerShell version that you are using.
207207
208-
```powershell
209-
Name Value
210-
---- -----
211-
PSVersion 6.0.0-alpha
212-
PSEdition Core
213-
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
214-
BuildVersion 3.0.0.0
215-
GitCommitId v6.0.0-alpha.12
216-
CLRVersion
217-
WSManStackVersion 3.0
218-
PSRemotingProtocolVersion 2.3
219-
SerializationVersion 1.1.0.1
208+
```powershell
209+
Name Value
210+
---- -----
211+
PSVersion 6.0.0-alpha
212+
PSEdition Core
213+
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
214+
BuildVersion 3.0.0.0
215+
GitCommitId v6.0.0-alpha.12
216+
CLRVersion
217+
WSManStackVersion 3.0
218+
PSRemotingProtocolVersion 2.3
219+
SerializationVersion 1.1.0.1
220220
221-
```
221+
```
222222
223223
1. `Exit`: To exit the PowerShell session, type `exit`.
224224
225-
```powershell
226-
exit
227-
```
225+
```powershell
226+
exit
227+
```
228228
229229
## Need Help?
230230

0 commit comments

Comments
 (0)