convert structured nodes to spans if necessary