Avoid ArrayOutOfBoundsException when text length is 0 (this can happen if you specify a soft hyphen as only content of a block, for example).