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)
fi
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"
;;
'') line_num=$((line_num + 1));;