prepare for a release

Change-Id: I5569201cb5a41640ee786d3e0a7814c3e0e907d6
coverity#1261355 using invalid iterator

Change-Id: I9dfdfa89e2e1d895ea4d669a2dad480c5a8966ad
flush remaining text before checking spans

Change-Id: I6938b0b13959a3ee83cfecae728c0a1a7baf531f