From a66fb317900f11b036ab3d37a2b38c0cc5b05ee0 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 28 Jul 2017 09:41:48 -0400 Subject: [PATCH] Use Lodash endsWith equivalent --- blocks/editable/patterns.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/editable/patterns.js b/blocks/editable/patterns.js index d84dceeab67446..7620c863e55e3f 100644 --- a/blocks/editable/patterns.js +++ b/blocks/editable/patterns.js @@ -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 @@ -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 || [