Changeset 1822

Show
Ignore:
Timestamp:
2008-03-27 16:36:25 (3 months ago)
Author:
wwalc
Message:

Fix for #1015 (Badly nested italic/bold markup)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • MediaWiki/trunk/plugins/mediawiki/fckplugin.js

    r1821 r1822  
    191191                                if ( basicElement ) 
    192192                                { 
     193                                        if ( ( basicElement[0] == "''" || basicElement[0] == "'''" ) && stringBuilder.length > 2 ) 
     194                                        { 
     195                                                var pr1 = stringBuilder[stringBuilder.length-1]; 
     196                                                var pr2 = stringBuilder[stringBuilder.length-2]; 
     197                                                 
     198                                                if ( pr1 + pr2 == "'''''") 
     199                                                        stringBuilder.push( ' ' ) ; 
     200                                        } 
     201                                         
    193202                                        if ( basicElement[0] ) 
    194203                                                stringBuilder.push( basicElement[0] ) ;