@@ -7,23 +7,28 @@ New-RegEx -Description "Matches an ANSI 3 or 4-bit color" |
77 New-RegEx - Pattern (
88
99 New-RegEx - Atomic -Or @ (
10+
1011 New-RegEx - Pattern 1 - Optional - Name IsBright |
11- New-RegEx - LiteralCharacter ' ;' - Min 0 - Max 1 |
12- New-RegEx - Pattern ' 3' - Name IsForegroundColor
13-
12+ New-RegEx - LiteralCharacter ' ;' - Min 0 - Max 1 - Comment " A 1 and a semicolon indicate a bright color " |
13+ New-RegEx - Pattern ' 3' - Name IsForegroundColor - Comment " A number that starts with 3 indicates foreground color "
14+
1415 New-RegEx - Name IsBright (
1516 New-RegEx - Pattern ' 9' - Name IsForegroundColor
16- )
17+ ) - Comment " OR it could be a less common bright foreground color, which starts with 9 "
1718
1819 New-RegEx - Pattern 1 - Optional - Name IsBright |
19- New-RegEx - LiteralCharacter ' ;' - Min 0 - Max 1 |
20- New-RegEx - Pattern ' 4' - Name IsBackgroundColor
20+ New-RegEx - LiteralCharacter ' ;' - Min 0 - Max 1 - Comment " A 1 and a semicolon indicate a bright color " |
21+ New-RegEx - Pattern ' 4' - Name IsBackgroundColor - Comment " A number that starts with 3 indicates foreground color "
2122
2223 New-RegEx - Name IsBright (
2324 New-RegEx - Pattern ' 10' - Name IsBackgroundColor
24- )
25- ) |
26- New-RegEx - Pattern ' [0-7]' - Name ColorNumber |
25+ ) - Comment " OR it could be a less common bright foreground color, which starts with 9"
26+ ) |
27+ New-RegEx - Pattern ' [0-7]' - Name ColorNumber - Comment " The color number will be between 0 and 7" |
28+ New-RegEx - NoCapture - Optional @ (
29+ New-RegEx - LiteralCharacter ' ;' - Min 0 - Max 1 |
30+ New-RegEx - Pattern 1 - Optional - Name IsBright
31+ ) - Comment " Brightness can also come after a color" |
2732 New-RegEx - LiteralCharacter ' m'
28- ) - Name Color | # >
29- Set-Content - Path (Join-Path $myRoot $myName )
33+ ) - Name Color |
34+ Set-Content - Path (Join-Path $myRoot $myName ) - PassThru
0 commit comments