nl_tokens: Adds new attribute
pl_tokens: function ( name , value , pos ) { var list = this . list ( ) ; var <mask> = this . nameRange ( ) . end ; var editTree = require ( 'editTree' ) ; var styles = _ . pick ( this . options , 'styleBefore' , 'styleSeparator' , 'styleQuote' ) ; if ( _ . isUndefined ( pos ) ) pos = list . length ; /** @type XMLEditAttribute */ var donor = list [ pos ] ; if ( donor ) { start = donor . fullRange ( ) . start ; } else if ( donor = list [ pos - 1 ] ) { start = donor . range ( ) . end ; } if ( donor ) { styles = _ . pick ( donor , 'styleBefore' , 'styleSeparator' , 'styleQuote' ) ; } value = styles . styleQuote + value + styles . styleQuote ; var attribute = new XMLEditElement ( this , editTree . createToken ( start + styles . styleBefore . length , name ) , editTree . createToken ( start + styles . styleBefore . length + name . length + styles . styleSeparator . length , value ) ) ; _ . extend ( attribute , styles ) ; // write new attribute into the source this . _updateSource ( attribute . styleBefore + attribute . toString ( ) , start ) ; // insert new attribute this . _children . splice ( pos , 0 , attribute ) ; return attribute ; }