Merge "Revert "TableSorter: Avoid FOUC and preserve styling in VisualEditor""
[lhc/web/wiklou.git] / includes / parser / Parser.php
index 7b4a650..f947285 100644 (file)
@@ -1113,15 +1113,15 @@ class Parser {
                                        $line = substr( $line, 1 );
                                }
 
+                               // Implies both are valid for table headings.
                                if ( $first_character === '!' ) {
                                        $line = str_replace( '!!', '||', $line );
                                }
 
                                # Split up multiple cells on the same line.
                                # FIXME : This can result in improper nesting of tags processed
-                               # by earlier parser steps, but should avoid splitting up eg
-                               # attribute values containing literal "||".
-                               $cells = StringUtils::explodeMarkup( '||', $line );
+                               # by earlier parser steps.
+                               $cells = explode( '||', $line );
 
                                $outLine = '';
 
@@ -5442,18 +5442,18 @@ class Parser {
                                                        if ( $handler->validateParam( $paramName, $match ) ) {
                                                                $handlerOptions[$paramName] = $match;
                                                        } else {
-                                                               // Guess not. Append it to the caption.
+                                                               // Guess not, consider it as caption.
                                                                wfDebug( "$parameterMatch failed parameter validation\n" );
-                                                               $label .= '|' . $parameterMatch;
+                                                               $label = '|' . $parameterMatch;
                                                        }
                                                }
 
                                        } else {
-                                               // concatenate all other pipes
-                                               $label .= '|' . $parameterMatch;
+                                               // Last pipe wins.
+                                               $label = '|' . $parameterMatch;
                                        }
                                }
-                               // remove the first pipe
+                               // Remove the pipe.
                                $label = substr( $label, 1 );
                        }