From 3014f291aea9dac2d60abc2856498aaae2af4f79 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 16 Mar 2016 22:59:03 +0000 Subject: [PATCH] TinyMCE: after discussion in Slack https://wordpress.slack.com/archives/core/p1458164584000700 - Remove `***` and `___` text pattern and support for spaces in `---`. The only `
` text pattern is 3 or more dashes, no spaces. - Remove the `*`, `**`, `_`, and `__` text patterns for bold and italic. Fixes #33300; git-svn-id: https://develop.svn.wordpress.org/trunk@37023 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/tinymce/plugins/wordpress/plugin.js | 9 --------- .../js/tinymce/plugins/wptextpattern/plugin.js | 6 +----- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js b/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js index 6c708dc454..968ebd9a6b 100644 --- a/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js @@ -291,15 +291,6 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { tr({ '#####': 'Heading 5' }) + tr({ '######': 'Heading 6' }) + tr({ '---': 'Horizontal line' }) + - tr({ '***': 'Horizontal line' }) + - ''; - - html = html + - '

' + __( 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' ) + '

' + - '' + - tr({ '*': 'Italic', '**': 'Bold' }) + - tr({ '_': 'Italic', '__': 'Bold' }) + - tr({ '`': 'Code', empty: '' }) + '
'; } diff --git a/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js b/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js index 4448f03afc..d68904afb1 100644 --- a/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js @@ -30,14 +30,10 @@ { start: '#####', format: 'h5' }, { start: '######', format: 'h6' }, { start: '>', format: 'blockquote' }, - { regExp: /^\s*(?:(?:\* ?){3,}|(?:_ ?){3,}|(?:- ?){3,})\s*$/, element: 'hr' } + { regExp: /^(-){3,}$/, element: 'hr' } ]; var inlinePatterns = [ - { start: '*', end: '*', format: 'italic' }, - { start: '**', end: '**', format: 'bold' }, - { start: '_', end: '_', format: 'italic' }, - { start: '__', end: '__', format: 'bold' }, { start: '`', end: '`', format: 'code' } ];