Skip to content

Commit

Permalink
fix(powershell) -- flags now highlighted correctly (#3203)
Browse files Browse the repository at this point in the history
  • Loading branch information
Patil2099 committed Jun 18, 2021
1 parent 50a6808 commit 19711d4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Expand Up @@ -11,6 +11,7 @@ Grammars:
- enh(elixir) much improved regular expression sigil support (#3207) [Josh Goebel][]
- enh(elixir) updated list of keywords (#3212) [Angelika Tyborska][]
- fix(elixir) fixed number detection when numbers start with a zero (#3212) [Angelika Tyborska][]
- fix(ps1) Flag highlighted incorrectly (#3167) [Pankaj Patil][]

[Stel Abrego]: https://github.com/stelcodes
[Josh Goebel]: https://github.com/joshgoebel
Expand All @@ -19,6 +20,7 @@ Grammars:
[Angelika Tyborska]: https://github.com/angelikatyborska
[Konrad Rudolph]: https://github.com/klmr
[tebeco]: https://github.com/tebeco
[Pankaj Patil]: https://github.com/patil2099


## Version 11.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/languages/powershell.js
Expand Up @@ -236,7 +236,7 @@ export default function(hljs) {
},
{
className: 'literal',
begin: /(-)[\w\d]+/,
begin: /(-){1,2}[\w\d-]+/,
relevance: 0
}
]
Expand Down
4 changes: 4 additions & 0 deletions test/markup/powershell/flags.expect.txt
@@ -0,0 +1,4 @@
<span class="hljs-string">&quot;Good Dog&quot;</span> <span class="hljs-literal">--match-lower-case</span> <span class="hljs-string">&quot;Dog&quot;</span>
<span class="hljs-number">2</span> <span class="hljs-literal">--equality-check</span> <span class="hljs-number">2</span>
<span class="hljs-string">&quot;abc&quot;</span> <span class="hljs-literal">--format-drive-fully</span> <span class="hljs-string">&quot;def&quot;</span>
format /dev/devices/driveA <span class="hljs-literal">--format-drive-fully</span> <span class="hljs-literal">-yes</span>
4 changes: 4 additions & 0 deletions test/markup/powershell/flags.txt
@@ -0,0 +1,4 @@
"Good Dog" --match-lower-case "Dog"
2 --equality-check 2
"abc" --format-drive-fully "def"
format /dev/devices/driveA --format-drive-fully -yes

0 comments on commit 19711d4

Please sign in to comment.