Merge remote-tracking branch 'elasticdog/spell-len-whitespace'

This commit is contained in:
Maxime Coste 2019-06-06 20:17:08 +10:00
commit 733cf564df

View File

@ -41,7 +41,8 @@ Formats of language supported:
pos=$(printf %s\\n "$line" | cut -d ' ' -f 3) pos=$(printf %s\\n "$line" | cut -d ' ' -f 3)
fi fi
word=$(printf %s\\n "$line" | cut -d ' ' -f 2) word=$(printf %s\\n "$line" | cut -d ' ' -f 2)
len=$(printf %s "$word" | wc -c) # trim whitespace to make `wc` output consistent across implementations
len=$(($(printf %s "$word" | wc -c)))
regions="$regions $line_num.$pos+${len}|Error" regions="$regions $line_num.$pos+${len}|Error"
;; ;;
'') line_num=$((line_num + 1));; '') line_num=$((line_num + 1));;