From: SourceForge.net <no...@so...> - 2010-10-18 14:46:49
|
Bugs item #3089456, was opened at 2010-10-18 01:49 Message generated for change (Comment added) made by mengel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=3089456&group_id=27350 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lang support Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Marc W. Mengel (mengel) Assigned to: Nobody/Anonymous (nobody) Summary: variables span or class yeild nested tag ugliness Initial Comment: If you cross-reference C code that has variable "span" the markup engine first puts <span class='reserved'>typedef</span> and then the identifier markup turns that into <<a href="...ident?i=span">span</a> class='reserved'>typedef</span> If you have a program with all 3 of "span", "class" and "reserved" as variables, the results are particualrly special. I've worked around this somewhat by hacking up Generic.pm with the following patch, but there are still a few such instances leaking through... *** Generic.pm.orig 2010-09-27 11:35:23.000000000 -0500 --- Generic.pm 2010-10-17 13:09:59.000000000 -0500 *************** *** 155,168 **** $self->processreserved($code); ! # Replace identifier by link unless it's a reserved word $$code =~ s{ ! (^|[^\$\w\#])([-\w~\#][\w]*)\b } { $1. ! ( $index->issymbol($2, $$self{'releaseid'}) ? join($2, @{$$self{'itag'}}) : $2 ); }gex; } --- 155,168 ---- $self->processreserved($code); ! # Replace identifier by link unless it's a reserved word or part of a span tag from above... $$code =~ s{ ! ((?:\s*<span.*?>.*?</span>\s*)+|[^\$\w\#]|^)([-\w~\#]?[\w]*)\b } { $1. ! ((! $self->isreserved($2) && $index->issymbol($2, $$self{'releaseid'})) ? join($2, @{$$self{'itag'}}) : $2 ); }gex; } ---------------------------------------------------------------------- >Comment By: Marc W. Mengel (mengel) Date: 2010-10-18 14:46 Message: Attached a patch which seems to work reliably now. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=3089456&group_id=27350 |