mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Shortcode JS: Avoid errors when an escaped shortcode includes a newline between brackets.
props gcorne. props Clorith, jorbin for tests. see #27907, for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@28223 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -37,13 +37,13 @@ window.wp = window.wp || {};
|
||||
// If we matched a leading `[`, strip it from the match
|
||||
// and increment the index accordingly.
|
||||
if ( match[1] ) {
|
||||
result.match = result.match.slice( 1 );
|
||||
result.content = result.content.slice( 1 );
|
||||
result.index++;
|
||||
}
|
||||
|
||||
// If we matched a trailing `]`, strip it from the match.
|
||||
if ( match[7] ) {
|
||||
result.match = result.match.slice( 0, -1 );
|
||||
result.content = result.content.slice( 0, -1 );
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -353,4 +353,4 @@ window.wp = window.wp || {};
|
||||
return text + '</' + options.tag + '>';
|
||||
}
|
||||
});
|
||||
}());
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user