r32863 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32862‎ | r32863 | r32864 >
Date:17:58, 6 April 2008
Author:simetrical
Status:old
Tags:
Comment:
Partial revert of r32376: don't strip whitespace from summaries. If you do, that means that the default "/* Section name */ " summary loses its trailing space if you hit preview before submitting, which is noticeably inconsistent and annoying. Maybe trim it on save, but I don't know if there's any point.
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -543,8 +543,8 @@
544544 # Truncate for whole multibyte characters. +5 bytes for ellipsis
545545 $this->summary = $wgLang->truncate( $request->getText( 'wpSummary' ), 250 );
546546
547 - # Remove extra headings and whitespace from summaries and new sections.
548 - $this->summary = trim(preg_replace('/^=+(.*?)=+$/', '$1', trim($this->summary)));
 547+ # Remove extra headings from summaries and new sections.
 548+ $this->summary = preg_replace('/^(\s*)=+(.*?)=+(\s*)$/', '$1$2$3', $this->summary);
549549
550550 $this->edittime = $request->getVal( 'wpEdittime' );
551551 $this->starttime = $request->getVal( 'wpStarttime' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32376* (bug 1600) Strip extra == section markup == in new-comment field...brion18:41, 24 March 2008

Status & tagging log