I found that the following type of bash construct is incorrectly highlighted, with everything following the "#" being treated as a comment:
calfile=${pathparts[$((${#pathparts[@]}-1))]}
This causes differences in those regions to be treated as "unimportant", which is clearly not the case here, as we are just getting the number of elements in the pathparts array.
calfile=${pathparts[$((${#pathparts[@]}-1))]}
This causes differences in those regions to be treated as "unimportant", which is clearly not the case here, as we are just getting the number of elements in the pathparts array.
Comment