Last modified: 2008-11-13 23:10:45 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 T18332, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16332 - substr parser function
substr parser function
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-13 17:07 UTC by Nicholas Wilson
Modified: 2008-11-13 23:10 UTC (History)
1 user (show)

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


Attachments
an extra parser function (1.26 KB, patch)
2008-11-13 17:07 UTC, Nicholas Wilson
Details

Description Nicholas Wilson 2008-11-13 17:07:01 UTC
Created attachment 5524 [details]
an extra parser function

In some templates, it is useful to be able to do some basic reading of the string. For example, the cite book template needs to be able to read at least the last letter of the strings it is passed, so that it can fix output by not putting a period after a period-ended string (this does appear on several real-world wiki articles), and the 'best practices' solution is to keep the period with the citation to be semantically correct, and fix this in the formatting stages in the template.

Now, if there is a way to do this, I have not yet found it (nor have the cite book authors), so my patch may be the wrong way/place to do this, but it is a simple, harmless, generic function that can be trivially wrapped in a template to do odd little useful things like in the cite book example.
Comment 1 Roan Kattouw 2008-11-13 20:42:14 UTC
Already in the StringFunctions extension, see bug 16197.
Comment 2 Nicholas Wilson 2008-11-13 23:10:45 UTC
Ah, sorry.  That (for some reason) is not on Wikipedia, which is probably why I had not found it when searching for this. Thanks.

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


Navigation
Links