Index: trunk/parsers/wikidom/lib/hype/views/es.SurfaceView.js |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | this.documentView.renderContent(); |
80 | 80 | }; |
81 | 81 | |
82 | | -es.SurfaceView.boundaries = [' ', '-', '\t', '\r', '\n', '\f']; |
| 82 | +es.SurfaceView.boundaryTest = /([ \-\t\r\n\f])/; |
83 | 83 | |
84 | 84 | es.SurfaceView.prototype.onMouseDown = function( e ) { |
85 | 85 | var offset = this.documentView.getOffsetFromEvent( e ); |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | var end = this.documentView.getRenderedLineRange( this.cursor.offset ).end |
158 | 158 | var data = this.documentView.getModel().data; |
159 | 159 | if ( es.DocumentModel.isContentData( data, end ) ) { |
160 | | - while( $.inArray( data[ end - 1 ], es.SurfaceView.boundaries ) ) { |
| 160 | + while( es.SurfaceView.boundaryTest.exec( data[ end - 1 ] ) ) { |
161 | 161 | end--; |
162 | 162 | } |
163 | 163 | } |