Last modified: 2013-08-05 15:45:39 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 T54548, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52548 - A newline is prepended to a module invocation that returns text starting with an asterisk
A newline is prepended to a module invocation that returns text starting with...
Status: RESOLVED DUPLICATE of bug 12974
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 12974
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-05 15:39 UTC by CodeCat
Modified: 2013-08-05 15:45 UTC (History)
4 users (show)

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


Attachments

Description CodeCat 2013-08-05 15:39:45 UTC
When the invocation of a module returns text with an asterisk as the first character, Scribunto prepends a newline to the text. This is obviously undesirable because it makes it impossible to do any further processing on the output of such an invocation.

To reproduce:

* Make a module with a function that returns "*test"
* Write in a wiki page: test{{#invoke:(your module)|(your function)}}

You'd expect this to return

test*test

but instead you get

test
*test

which the software then interprets as a bullet list.
Comment 1 Bartosz Dziewoński 2013-08-05 15:42:25 UTC
This is yet another clever feature of MediaWiki's parser, see bug 12974.
Comment 2 Brad Jorsch 2013-08-05 15:45:39 UTC
{{#invoke}} is a parser function, so this is a duplicate, not just a "depends on".

*** This bug has been marked as a duplicate of bug 12974 ***

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


Navigation
Links