Hello Ashar,
does it make sense to assign a class to an anchor? Classes only make sense for links, or do I miss something?
Regards,
jens
On Tue, Mar 16, 2004 at 02:25:12PM +0000, Ashar Voultoiz wrote:
Update of /cvsroot/wikipedia/phase3/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10480/includes
Modified Files: Parser.php Log Message: Fix source forge bug 803693
When a title is given in a == == headline, the html was incorectly generated as: <a name="sectionname"></a><a class="internal">link</a>
It now generates:
<a class="internal" name="sectioname">link</a>
Index: Parser.php
RCS file: /cvsroot/wikipedia/phase3/includes/Parser.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Parser.php 16 Mar 2004 03:58:36 -0000 1.25 --- Parser.php 16 Mar 2004 14:25:09 -0000 1.26
*** 1290,1300 **** }
// Put it all together
! $head[$c].="<h".$level.$matches[2][$c] ! ."<a name="".$anchor."">" ! .$headline ! ."</a>" ! ."</h".$level.">"; // Add the edit section link --- 1290,1309 ---- } ! // the headline might have a link ! if(preg_match("/(.*)<a(.*)/",$headline, $headlinematches)) ! { ! // if so give an anchor name to the already existent link ! $headline = $headlinematches[1] ! ."<a name="".$anchor."" ".$headlinematches[2]; ! } else { ! // else create an anchor link for the headline ! $headline = "<a name="".$anchor."">" ! .$headline ! ."</a>"; ! } ! ! // give headline the correct <h#> tag ! $head[$c].="<h".$level.$matches[2][$c] .$headline."</h".$level.">"; // Add the edit section link
MediaWiki-CVS mailing list MediaWiki-CVS@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-cvs
wikitech-l@lists.wikimedia.org