PowerShell / EditorSyntax

PowerShell syntax highlighting for editors (VS Code, Atom, SublimeText, TextMate, etc.) and GitHub!
MIT License
133 stars 45 forks source link

build.ps1/build_helpers.ps1 issues #169

Open msftrncs opened 5 years ago

msftrncs commented 5 years ago

Issue Description

build.ps1

tools\build_helpers.ps1

function ExtractAtom
function ParseJasmine

https://github.com/PowerShell/EditorSyntax/blob/cf27d6e54ff9fc593bfb46d22a671898fb31c0a9/tools/build-helpers.ps1#L38-L56

I'll post a PR shortly demonstrating these changes.

msftrncs commented 5 years ago

Realized I missed a minor detail:

Originally:

$x = $_ -replace '^(\s*)(Expected)(.*)\s(to equal .*)','$1$2$3%%$1$4' 
$x.Replace('%%',"`n  ") 

I replaced with:

$_ -replace '^(\s*)(Expected.*?)\s(instead found .*)', "`$1`$2`n`$1`$3"

I missed the two spaces following the `n in the string .replace() method invocation. Ideally these should be stuck between `$1 and `$3 incase $1 results in a pattern of `t. They cause the instead found message to be slightly indented compared to the Expected message, but I am not sure this is too important.