mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Special-casing \r breaks the word regexp
This commit is contained in:
@@ -664,7 +664,7 @@ class Cursor extends Model {
|
||||
// Returns a {RegExp}.
|
||||
wordRegExp (options) {
|
||||
const nonWordCharacters = _.escapeRegExp(this.getNonWordCharacters())
|
||||
let source = `^[\t\r ]*$|[^\\s${nonWordCharacters}]+`
|
||||
let source = `^[\t ]*$|[^\\s${nonWordCharacters}]+`
|
||||
if (!options || options.includeNonWordCharacters !== false) {
|
||||
source += `|${`[${nonWordCharacters}]+`}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user