forked from ramda/ramda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix, add use first flags property, and support dotAll flag (ramda#3158)
* fix, add use first flags property, and support dotAll flag * add dotAll flag test case * move eslint-env comment to top * remove eslint-env comment
- Loading branch information
1 parent
7277709
commit 1bd60c5
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
export default function _cloneRegExp(pattern) { | ||
return new RegExp(pattern.source, (pattern.global ? 'g' : '') + | ||
(pattern.ignoreCase ? 'i' : '') + | ||
(pattern.multiline ? 'm' : '') + | ||
(pattern.sticky ? 'y' : '') + | ||
(pattern.unicode ? 'u' : '')); | ||
return new RegExp(pattern.source, (pattern.flags ? pattern.flags : (pattern.global ? 'g' : '') + | ||
(pattern.ignoreCase ? 'i' : '') + | ||
(pattern.multiline ? 'm' : '') + | ||
(pattern.sticky ? 'y' : '') + | ||
(pattern.unicode ? 'u' : '') + | ||
(pattern.dotAll ? 's' : ''))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters