add keepNext and keepLines flags to paragraph settings