Author Topic: PowerShell in markdown uses the wrong word delimiters  (Read 57 times)

spongyryno

  • Community Member
  • Posts: 19
  • Hero Points: 0
PowerShell in markdown uses the wrong word delimiters
« on: September 08, 2021, 03:12:10 pm »
If I have a PowerShell (*.ps1) file, and I have a variable:

Code: [Select]
$foo = "hello"

If I place the cursor at the end of $foo and then use the keyboard to select the variable, the whole thing is selected correctly, including the dollar sign.

However, if I have the same thing as embedded PowerShell inside a markdown file (*.md):


Code: [Select]

```PowerShell
$foo = "hello"
```

...and I do the same thing, it does not include the dollar sign... even though that's a critical part of the variable name. How can I fix this?

I'm on SlickEdit 25.0.2.0, 64-bit.


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5943
  • Hero Points: 467
Re: PowerShell in markdown uses the wrong word delimiters
« Reply #1 on: September 10, 2021, 12:39:36 am »
You can work around this problem by adding $ to the Word chars for Markdown. Tools>Options>Languages>Web Authoring Languages>Markdown>General>Word chars

We might be able to automate this in the future. It's pretty involved because word matching is done in many places (including mouse operations).