Ticket #8774: 8774_2.patch

File 8774_2.patch, 1.4 KB (added by Garry Yao, 12 years ago)
  • _source/plugins/entities/plugin.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    114114                        if ( htmlFilter )
    115115                        {
    116116                                // Mandatory HTML base entities.
    117                                 var selectedEntities = '';
     117                                var selectedEntities = [];
    118118
    119119                                if ( config.basicEntities !== false )
    120                                         selectedEntities += htmlbase;
     120                                        selectedEntities.push( htmlbase );
    121121
    122122                                if ( config.entities )
    123123                                {
    124                                         selectedEntities += ',' + entities;
     124                                        if ( selectedEntities.length )
     125                                                selectedEntities.push( entities )
     126
    125127                                        if ( config.entities_latin )
    126                                                 selectedEntities += ',' + latin;
     128                                                selectedEntities.push( latin );
    127129
    128130                                        if ( config.entities_greek )
    129                                                 selectedEntities += ',' + greek;
     131                                                selectedEntities.push( greek );
    130132
    131133                                        if ( config.entities_additional )
    132                                                 selectedEntities += ',' + config.entities_additional;
     134                                                selectedEntities.push( config.entities_additional );
    133135                                }
    134136
    135                                 var entitiesTable = buildTable( selectedEntities );
     137                                var entitiesTable = buildTable( selectedEntities.join( ',' ) );
    136138
    137139                                // Create the Regex used to find entities in the text, leave it matches nothing if entities are empty.
    138140                                var entitiesRegex = entitiesTable.regex ? '[' + entitiesTable.regex + ']' : 'a^';
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy