Last modified: 2010-05-15 15:32:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T2523, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 523 - Template at beginning of paragraph "eats" preceeding paragraph break
Template at beginning of paragraph "eats" preceeding paragraph break
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
  Show dependency treegraph
Reported: 2004-09-18 20:20 UTC by JeLuF
Modified: 2010-05-15 15:32 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description JeLuF 2004-09-18 20:20:58 UTC
The following wikitext:

  First paragraph.



First paragraph. This article is a stub.

This doesn't happen in REL1_3 without Wal's patch for Bug 60, but it happens
with Wal's patch applied in both REL1_3 and HEAD.

Parser::replaceVariables has these lines:
 $regex = '/(\\n?){{(['.$nonBraceChars.']*)(\\|.*?|)}}/s';
 $text = preg_replace_callback( 
             $text );

Parser::braceSubstitution assigns $newline = $matches[1]; but it doesn't 
use $newline anywhere.

Why should newlines in front of {{ be stripped anyway?
Comment 1 JeLuF 2004-09-18 21:13:22 UTC
newlines weren't stripped in the old code. The code just had to know whether the
template was included at the beginning of a line or not. Block elements are
treated differently in the two cases.

Note You need to log in before you can comment on or make changes to this bug.