Skip to content

Commit

Permalink
Simplify filter divider regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
maoberlehner committed Dec 14, 2017
1 parent 5d3c69a commit a218d45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IFilterParser } from '../interfaces/IFilterParser';

export function parseNodeFiltersFactory(): IFilterParser {
return (url: string) => {
const filterDivider = /[\n\r\s]+from[\n\r\s]+/;
const filterDivider = /[\s]+from[\s]+/;

if (!filterDivider.test(url)) {
return [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function parseSelectorFiltersFactory(
splitSelectorFilter: ISplitSelectorFilter,
): IParseSelectorFilters {
return (url: string) => {
const filterDivider = /[\n\r\s]+from[\n\r\s]+/;
const filterDivider = /[\s]+from[\s]+/;

if (!filterDivider.test(url)) {
return [];
Expand Down

0 comments on commit a218d45

Please sign in to comment.