WordPress.org

Make WordPress Core

Ticket #27386: 27386.3.patch

File 27386.3.patch, 3.9 KB (added by adamsilverstein, 7 years ago)

refresh patch, tabs not spaces in qunit index file, correct jshint error

  • src/wp-admin/js/word-count.js

     
    66                settings : {
    77                        strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags
    88                        clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc.
     9                        shortcode : /\[[a-zA-z0-9\/][^\[\]]*\]/g,       // regexp to detect shortcodes
    910                        w : /\S\s+/g, // word-counting regexp
    1011                        c : /\S/g // char-counting regexp for asian languages
    1112                },
     
    2930                                if ( tx ) {
    3031                                        tx = tx.replace( t.settings.strip, ' ' ).replace( /&nbsp;|&#160;/gi, ' ' );
    3132                                        tx = tx.replace( t.settings.clean, '' );
     33                                        tx = tx.replace( t.settings.shortcode, '' );
    3234                                        tx.replace( t.settings[type], function(){tc++;} );
    3335                                }
    3436                                w.html(tc.toString());
  • tests/qunit/index.html

     
    11<!DOCTYPE HTML>
    22<html>
    33<head>
    4   <title>WordPress QUnit Test Suite</title>
     4        <title>WordPress QUnit Test Suite</title>
    55
    6   <!-- Dependencies -->
    7   <script src="../../src/wp-includes/js/jquery/jquery.js"></script>
    8   <script src="../../src/wp-includes/js/underscore.min.js"></script>
    9   <script src="../../src/wp-includes/js/backbone.min.js"></script>
    10   <script src="../../src/wp-includes/js/zxcvbn.min.js"></script>
    11        
    12   <!-- QUnit -->
    13   <link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
    14   <script src="vendor/qunit.js"></script>
    15   <script src="vendor/sinon.js"></script>
    16   <script src="vendor/sinon-qunit.js"></script>
     6        <!-- Dependencies -->
     7        <script src="../../src/wp-includes/js/jquery/jquery.js"></script>
     8        <script src="../../src/wp-includes/js/underscore.min.js"></script>
     9        <script src="../../src/wp-includes/js/backbone.min.js"></script>
     10        <script src="../../src/wp-includes/js/zxcvbn.min.js"></script>
     11
     12
     13        <!-- QUnit -->
     14        <link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
     15        <script src="vendor/qunit.js"></script>
     16        <script src="vendor/sinon.js"></script>
     17        <script src="vendor/sinon-qunit.js"></script>
    1718</head>
    1819<body>
    19   <div>
    20     <h1 id="qunit-header">WordPress QUnit Test Suite</h1>
    21     <h2 id="qunit-banner"></h2>
    22     <h2 id="qunit-userAgent"></h2>
    23     <ol id="qunit-tests"></ol>
    24     <div id="qunit-fixture">
    25       <script src="fixtures/customize-header.js"></script>
    26     </div>
    27     <p><a href="editor">TinyMCE tests</a></p>
    28 
    29     <!-- Tested files -->
    30     <script src="../../src/wp-admin/js/password-strength-meter.js"></script>
    31     <script src="../../src/wp-includes/js/customize-models.js"></script>
    32     <script src="../../src/wp-includes/js/shortcode.js"></script>
    33 
    34     <!-- Unit tests -->
    35     <script src="wp-admin/js/password-strength-meter.js"></script>
    36     <script src="wp-admin/js/customize-header.js"></script>
    37     <script src="wp-includes/js/shortcode.js"></script>
    38   </div>
     20        <div>
     21                <h1 id="qunit-header">WordPress QUnit Test Suite</h1>
     22                <h2 id="qunit-banner"></h2>
     23                <h2 id="qunit-userAgent"></h2>
     24                <ol id="qunit-tests"></ol>
     25                <div id="qunit-fixture">
     26                        <script src="fixtures/customize-header.js"></script>
     27                </div>
     28                <p><a href="editor">TinyMCE tests</a></p>
     29                <div class="word-count"></div>
     30                <!-- Tested files -->
     31                <script src="../../src/wp-admin/js/password-strength-meter.js"></script>
     32                <script src="../../src/wp-includes/js/customize-models.js"></script>
     33                <script src="../../src/wp-includes/js/shortcode.js"></script>
     34                <script src="../../src/wp-admin/js/word-count.js"></script>
     35                <!-- Unit tests -->
     36                <script src="wp-admin/js/password-strength-meter.js"></script>
     37                <script src="wp-admin/js/customize-header.js"></script>
     38                <script src="wp-includes/js/shortcode.js"></script>
     39                <script src="wp-includes/js/word-count.js"></script>
     40        </div>
    3941</body>
    4042</html>
    4143