mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
Support multiline strings
This commit is contained in:
parent
2c5acaefa9
commit
667495bfb7
3 changed files with 52 additions and 6 deletions
|
|
@ -60,13 +60,13 @@ ZSH_HIGHLIGHT_HIGHLIGHTERS=($1)
|
|||
for data_file in ${0:h:h}/highlighters/$1/test-data/*; do
|
||||
|
||||
# Load the data and prepare checking it.
|
||||
BUFFER= ; expected_region_highlight=(); errors=()
|
||||
PREBUFFER= BUFFER= ; expected_region_highlight=(); errors=()
|
||||
echo -n "* ${data_file:t:r}: "
|
||||
. $data_file
|
||||
|
||||
# Check the data declares $BUFFER.
|
||||
if [[ ${#BUFFER} -eq 0 ]]; then
|
||||
errors+=("'BUFFER' is not declared or blank.")
|
||||
# Check the data declares $PREBUFFER or $BUFFER.
|
||||
if [[ ${#PREBUFFER} -eq 0 && ${#BUFFER} -eq 0 ]]; then
|
||||
errors+=("Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank")
|
||||
else
|
||||
|
||||
# Check the data declares $expected_region_highlight.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue