@@ -762,39 +762,39 @@ contexts:
762762 - include : single-quoted-heredoc-strings
763763
764764 single-quoted-strings :
765- - match : \ '
765+ - match : ' {{single_quote}} '
766766 scope : punctuation.definition.string.begin.powershell
767767 push : inside-single-quoted-string
768768
769769 inside-single-quoted-string :
770770 - meta_include_prototype : false
771771 - meta_scope : meta.string.powershell string.quoted.single.powershell
772- - match : " '' "
772+ - match : ' {{single_quote}}{2} '
773773 scope : constant.character.escape.powershell
774- - match : \ '
774+ - match : ' {{single_quote}} '
775775 scope : punctuation.definition.string.end.powershell
776776 pop : 1
777777 - include : string-placeholders
778778
779779 double-quoted-strings :
780- - match : ' " '
780+ - match : ' {{double_quote}} '
781781 scope : punctuation.definition.string.begin.powershell
782782 push : inside-double-quoted-string
783783
784784 inside-double-quoted-string :
785785 - meta_include_prototype : false
786786 - meta_scope : meta.string.interpolated.powershell string.quoted.double.powershell
787- - match : ' "" '
787+ - match : ' {{double_quote}}{2} '
788788 scope : constant.character.escape.powershell
789789 - include : escape-sequences
790- - match : ' " '
790+ - match : ' {{double_quote}} '
791791 scope : punctuation.definition.string.end.powershell
792792 pop : 1
793793 - include : string-interpolations
794794 - include : string-placeholders
795795
796796 single-quoted-heredoc-strings :
797- - match : \@' (?=$)
797+ - match : \@{{single_quote}} (?=$)
798798 scope : punctuation.definition.string.begin.powershell
799799 push :
800800 - inside-single-quoted-heredoc-string
@@ -805,24 +805,24 @@ contexts:
805805 - match : (?={{csharp_indicator}})
806806 set : scope:source.cs
807807 with_prototype :
808- - match : (?=^' @)
808+ - match : (?=^{{single_quote}} @)
809809 pop : 1
810- - match : " '' "
810+ - match : ' {{single_quote}}{2} '
811811 scope : constant.character.escape.powershell
812812 - include : else-pop
813813
814814 inside-single-quoted-heredoc-string :
815815 - meta_include_prototype : false
816816 - meta_scope : meta.string.powershell string.quoted.single.heredoc.powershell
817- - match : ^' @
817+ - match : ^{{single_quote}} @
818818 scope : punctuation.definition.string.end.powershell
819819 pop : 1
820- - match : " '' "
820+ - match : ' {{single_quote}}{2} '
821821 scope : constant.character.escape.powershell
822822 - include : string-placeholders
823823
824824 double-quoted-heredoc-strings :
825- - match : \@" (?=$)
825+ - match : \@{{double_quote}} (?=$)
826826 scope : punctuation.definition.string.begin.powershell
827827 push :
828828 - inside-double-quoted-heredoc-string
@@ -831,7 +831,7 @@ contexts:
831831 inside-double-quoted-heredoc-string :
832832 - meta_include_prototype : false
833833 - meta_scope : meta.string.interpolated.powershell string.quoted.double.heredoc.powershell
834- - match : ^" @
834+ - match : ^{{double_quote}} @
835835 scope : punctuation.definition.string.end.powershell
836836 pop : 1
837837 - include : escape-sequences
@@ -843,7 +843,7 @@ contexts:
843843 - match : (?={{csharp_indicator}})
844844 set : scope:source.cs
845845 with_prototype :
846- - match : (?=^" @)
846+ - match : (?=^{{double_quote}} @)
847847 pop : 1
848848 - include : escape-sequences
849849 - include : else-pop
@@ -879,7 +879,7 @@ contexts:
879879 - match : \}
880880 scope : punctuation.definition.placeholder.end.powershell
881881 pop : 1
882- - match : (?=['"] )
882+ - match : (?={{single_quote}}|{{double_quote}} )
883883 pop : 1
884884 - match : ' [:,;]'
885885 scope : punctuation.separator.powershell
@@ -1021,7 +1021,7 @@ contexts:
10211021 scope : punctuation.separator.sequence.powershell
10221022
10231023 escape-sequences :
1024- - match : ' `[0abenfrvt" '' $`]'
1024+ - match : ' `(?: [0abenfrvt$`]|{{single_quote}}|{{double_quote}}) '
10251025 scope : constant.character.escape.powershell
10261026 - match : ' `u\{\h+\}'
10271027 scope : constant.character.escape.powershell
@@ -1162,6 +1162,8 @@ variables:
11621162 )
11631163
11641164 # Strings
1165+ single_quote : " ['‘’]"
1166+ double_quote : ' ["“”]'
11651167 csharp_indicator : |-
11661168 (?x: \s* (?:
11671169 using\s+System[.;]
0 commit comments