Call buffer.commit() in rcdata/rawtext/plaintext states