You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the sequence [List[int]] is broken up and highlighted as:
[ - operator
List[int]] - no recognised special token (yes, that includes the matching closing bracket)
In typical PowerShell highlights, the entire type cast token is a single color, or else the brackets are a different color with the text inside a single coherent color -- but matching brackets are always coloured the same, whereas with default highlighting settings, Rouge instead only colors the opening bracket and nothing else.
${Braced Variables} -- within the ${ } boundary, any character at all is treated as a valid variable character, regardless of whether it is normally a legal variable name character or not.
Currently a braced variable with a scope specifier, e.g. ${function:mkdir} is parsed as:
${ - keyword
function - Name.Variable
:mkdir - Unrecognised / no highlighting
} - keyword
Instead, the whole token${function:mkdir} ought to be treated as a single variable token in PowerShell code.
Although I have not yet had a chance to test for certain, I suspect similarly-written scope modifiers such as $global:ErrorActionPreference may be similarly split-highlighted.
The text was updated successfully, but these errors were encountered:
@vexx32 This should be fixed with the new PowerShell lexer that was merged via #1213. Your examples look good to me but please let us know if you're still having problems. Sorry it took so long! >_<
The following two PowerShell language tokens are improperly parsed:
[ObjectType]
type or type cast tokens. These may have embedded type tokens as well:Currently, the sequence
[List[int]]
is broken up and highlighted as:[
- operatorList[int]]
- no recognised special token (yes, that includes the matching closing bracket)In typical PowerShell highlights, the entire type cast token is a single color, or else the brackets are a different color with the text inside a single coherent color -- but matching brackets are always coloured the same, whereas with default highlighting settings, Rouge instead only colors the opening bracket and nothing else.
${Braced Variables}
-- within the${ }
boundary, any character at all is treated as a valid variable character, regardless of whether it is normally a legal variable name character or not.Currently a braced variable with a scope specifier, e.g.
${function:mkdir}
is parsed as:${
- keywordfunction
- Name.Variable:mkdir
- Unrecognised / no highlighting}
- keywordInstead, the whole token
${function:mkdir}
ought to be treated as a single variable token in PowerShell code.Although I have not yet had a chance to test for certain, I suspect similarly-written scope modifiers such as
$global:ErrorActionPreference
may be similarly split-highlighted.The text was updated successfully, but these errors were encountered: