Syntax Highlighting for Powershell only partially working in livepreview

As you can see from attached screenshots, in edit mode syntax highlighting does only work on some words, for example the Cmdlet Set-MailboxFolderPermission stays black while others like Write-Output are coloured yellow. In reading mode, everything works as expected