dollar-double-quoted-argument: Support the syntax «"${foo}"». (Issue #186.)
This commit is contained in:
		
							parent
							
								
									28776371a0
								
							
						
					
					
						commit
						6e3720f39d
					
				|  | @ -448,6 +448,9 @@ _zsh_highlight_main_highlighter_highlight_string() | ||||||
|             if [[ ${arg:$i} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+) ]] ; then |             if [[ ${arg:$i} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+) ]] ; then | ||||||
|               (( k += $#MATCH )) # highlight the parameter name |               (( k += $#MATCH )) # highlight the parameter name | ||||||
|               (( i += $#MATCH )) # skip past it |               (( i += $#MATCH )) # skip past it | ||||||
|  |             elif [[ ${arg:$i} =~ ^[{]([A-Za-z_][A-Za-z0-9_]*|[0-9]+)[}] ]] ; then | ||||||
|  |               (( k += $#MATCH )) # highlight the parameter name and braces | ||||||
|  |               (( i += $#MATCH )) # skip past it | ||||||
|             else |             else | ||||||
|               continue |               continue | ||||||
|             fi |             fi | ||||||
|  |  | ||||||
|  | @ -31,6 +31,6 @@ BUFFER=': "${foo}bar"' | ||||||
| 
 | 
 | ||||||
| expected_region_highlight=( | expected_region_highlight=( | ||||||
|   "3 3 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # " |   "3 3 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # " | ||||||
|   "4 9 $ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument] 'issue #186'" # ${foo} |   "4 9 $ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]" # ${foo} | ||||||
|   "10 13 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # bar" |   "10 13 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # bar" | ||||||
| ) | ) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue