Skip to main content
edited body
Source Link
Joel Coehoorn
  • 40.4k
  • 21
  • 111
  • 177

For what it’s worth, Stack Overflow still does not provide a good option for PowerShell at all right now.

To show this, let's look at one of the most-basic items in PowerShell: the Get-dateDate cmdlet.

Starting with <!-- language: lang-powershell -->

Get-dateDate

Or ```sh

Get-dateDate

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-dateDate

which does nothing at all, and ```lang-default

Get-dateDate

which at least allows some kind of detection to work, but it still gets it wrong.

For what it’s worth, Stack Overflow still does not provide a good option for PowerShell at all right now.

To show this, let's look at one of the most-basic items in PowerShell: the Get-date cmdlet.

Starting with <!-- language: lang-powershell -->

Get-date

Or ```sh

Get-date

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-date

which does nothing at all, and ```lang-default

Get-date

which at least allows some kind of detection to work, but it still gets it wrong.

For what it’s worth, Stack Overflow still does not provide a good option for PowerShell at all right now.

To show this, let's look at one of the most-basic items in PowerShell: the Get-Date cmdlet.

Starting with <!-- language: lang-powershell -->

Get-Date

Or ```sh

Get-Date

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-Date

which does nothing at all, and ```lang-default

Get-Date

which at least allows some kind of detection to work, but it still gets it wrong.

Active reading [<https://en.wikipedia.org/wiki/PowerShell>]. Expanded. Added some context.
Source Link

fwiwFor what it’s worth, Stack Overflow still does not provide a good option for powershellPowerShell at all right now.

To show this, let's look at one of the most-basic items in PowershellPowerShell: the Get-dateGet-date cmdlet.

Starting with <!-- language: lang-powershell -->

Get-date

Or ```sh

Get-date

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-date

which does nothing at all, and ```lang-default

Get-date

which at least allows some kind of detection to work, but it still gets it wrong.

fwiw, Stack Overflow still does not provide a good option for powershell at all right now.

To show this, let's look at one of the most-basic items in Powershell: the Get-date cmdlet.

Starting with <!-- language: lang-powershell -->

Get-date

Or ```sh

Get-date

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-date

which does nothing at all, and ```lang-default

Get-date

which at least allows some kind of detection to work but still gets it wrong.

For what it’s worth, Stack Overflow still does not provide a good option for PowerShell at all right now.

To show this, let's look at one of the most-basic items in PowerShell: the Get-date cmdlet.

Starting with <!-- language: lang-powershell -->

Get-date

Or ```sh

Get-date

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-date

which does nothing at all, and ```lang-default

Get-date

which at least allows some kind of detection to work, but it still gets it wrong.

Rollback to Revision 3
Source Link
Makyen
  • 24.5k
  • 8
  • 43
  • 79

For what it's worthfwiw, Stack Overflow still does not provide a good highlighting option for PowershellStack Overflow still does not provide a good option for powershell at all right now.

To show this, let's look at one of the most-basic items in Powershell: the Get-date cmdlet.

Starting with <!-- language: lang-powershell -->

Get-date

Or ```sh

Get-date

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-date

which does nothing at all, and ```lang-default

Get-date

which at least allows some kind of detection to work, but still gets it wrong.

The most current version of highlight.js does highlight this correctly:

Screenshot of the HL.js demo tool

So it does seem to be a version issue, rather than an HL.js one.

For what it's worth, Stack Overflow still does not provide a good highlighting option for Powershell right now.

To show this, let's look at one of the most-basic items in Powershell: the Get-date cmdlet.

Starting with <!-- language: lang-powershell -->

Get-date

Or ```sh

Get-date

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-date

which does nothing at all, and ```lang-default

Get-date

which at least allows some kind of detection to work, but still gets it wrong.

The most current version of highlight.js does highlight this correctly:

Screenshot of the HL.js demo tool

So it does seem to be a version issue, rather than an HL.js one.

fwiw, Stack Overflow still does not provide a good option for powershell at all right now.

To show this, let's look at one of the most-basic items in Powershell: the Get-date cmdlet.

Starting with <!-- language: lang-powershell -->

Get-date

Or ```sh

Get-date

Both cases see the - as a subtraction operator and then show the words "Get" and "date" in different colors. Yet clearly this is one call to the Get-date cmdlet.

There's also ```powershell

Get-date

which does nothing at all, and ```lang-default

Get-date

which at least allows some kind of detection to work but still gets it wrong.

Note that the PS highlighting is fixed in the current HL.js version, tie answer complaint back to question
Source Link
zcoop98
  • 10k
  • 3
  • 26
  • 58
Loading
added 8 characters in body
Source Link
Joel Coehoorn
  • 40.4k
  • 21
  • 111
  • 177
Loading
edited body
Source Link
Joel Coehoorn
  • 40.4k
  • 21
  • 111
  • 177
Loading
Source Link
Joel Coehoorn
  • 40.4k
  • 21
  • 111
  • 177
Loading