Skip to content

Commit

Permalink
Merge pull request #2072 from WordPress/update/endswith
Browse files Browse the repository at this point in the history
Use Lodash endsWith equivalent
  • Loading branch information
aduth authored Jul 28, 2017
2 parents e36ff3e + a66fb31 commit b3c3bd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/editable/patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import tinymce from 'tinymce';
import { find, get, escapeRegExp, partition, drop } from 'lodash';
import { endsWith, find, get, escapeRegExp, partition, drop } from 'lodash';

/**
* WordPress dependencies
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function( editor ) {

const [ enterPatterns, spacePatterns ] = partition(
patterns,
( { regExp } ) => regExp.source.endsWith( '$' ),
( { regExp } ) => endsWith( regExp.source, '$' ),
);

const inlinePatterns = settings.inline || [
Expand Down

0 comments on commit b3c3bd6

Please sign in to comment.