Skip to content
This repository has been archived by the owner on Jun 21, 2019. It is now read-only.

Commit

Permalink
Refactor to use generic changeinside in new retext
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 13, 2015
1 parent 90fe4ad commit 7907bd9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function onchangeinparent(parent) {
* @this {SentenceNode}
*/

function onchange() {
function onchangeinside() {
var self;

self = this;
Expand All @@ -131,15 +131,9 @@ function onchange() {
*/

function language(retext) {
var SentenceNode;

retext.use(visit);

SentenceNode = retext.TextOM.SentenceNode;

SentenceNode.on('changetextinside', onchange);
SentenceNode.on('removeinside', onchange);
SentenceNode.on('insertinside', onchange);
retext.TextOM.SentenceNode.on('changeinside', onchangeinside);

/**
* Define `onrun`.
Expand Down

0 comments on commit 7907bd9

Please sign in to comment.