Skip to content

Commit

Permalink
Remove memize() to avoid unexpected caching bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Jul 11, 2018
1 parent fe4d5b5 commit 4ccde94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/shortcode/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ export function string( options ) {
*
* @return {RegExp} Shortcode RegExp.
*/
export const regexp = memize( ( tag ) => {
export const regexp = ( tag ) => {
return new RegExp( '\\[(\\[?)(' + tag + ')(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)', 'g' );
} );
};

/**
* Parse shortcode attributes.
Expand Down

0 comments on commit 4ccde94

Please sign in to comment.