I found out that `isUnrenderedWhitespace` can be false positive for user created whitespaces which are actually rendered, so this check is necessary.