@@ -151,7 +151,7 @@ ve.ce.Document.prototype.getNodeAndOffset = function ( offset ) {
151151}
152152node = ceChild . $element [ 0 ] ;
153153if ( node ) {
154- return { node : node , offset :0 } ;
154+ return { node, offset :0 } ;
155155}
156156// Else ceChild has no DOM representation; step forwards
157157break ;
@@ -166,10 +166,10 @@ ve.ce.Document.prototype.getNodeAndOffset = function ( offset ) {
166166}
167167if ( ! ceChild || ! ceChild . $element [ 0 ] ) {
168168// Offset lies just at the end of branchNode
169- return { node : node , offset :node . childNodes . length } ;
169+ return { node, offset :node . childNodes . length } ;
170170}
171171return {
172- node : node ,
172+ node,
173173offset :Array . prototype . indexOf . call (
174174node . childNodes ,
175175ceChild . $element [ 0 ]
@@ -194,7 +194,7 @@ ve.ce.Document.prototype.getNodeAndOffset = function ( offset ) {
194194position ,
1951951 ,
196196{
197- noDescend : noDescend ,
197+ noDescend,
198198stop :function ( ) {
199199return true ;
200200}
@@ -213,12 +213,12 @@ ve.ce.Document.prototype.getNodeAndOffset = function ( offset ) {
213213// TODO: what about zero-length text nodes?
214214if ( offset <= count + node . data . length ) {
215215// Match the appropriate offset in the text node
216- position = { node : node , offset :offset - count } ;
216+ position = { node, offset :offset - count } ;
217217break ;
218218} else {
219219// Skip over the text node
220220count += node . data . length ;
221- position = { node : node , offset :node . data . length } ;
221+ position = { node, offset :node . data . length } ;
222222continue ;
223223}
224224} // else it is an element node (TODO: handle comment etc)
@@ -257,7 +257,7 @@ ve.ce.Document.prototype.getNodeAndOffset = function ( offset ) {
257257} else if ( step . type === 'cross' ) {
258258if ( offset === count + 1 ) {
259259// The offset lies inside the crossed node
260- position = { node : node , offset :0 } ;
260+ position = { node, offset :0 } ;
261261break ;
262262}
263263count += 2 ;
@@ -303,7 +303,7 @@ ve.ce.Document.prototype.getNodeAndOffset = function ( offset ) {
303303}
304304return false ;
305305}
306- ve . adjacentDomPosition ( position , 1 , { stop : stop , noDescend : noDescend } ) . steps
306+ ve . adjacentDomPosition ( position , 1 , { stop, noDescend} ) . steps
307307. slice ( 0 , - 1 )
308308. forEach ( ( s ) => {
309309if ( s . node . nodeType === Node . TEXT_NODE ) {