Skip Menu |

This queue is for tickets about the Syntax-Highlight-HTML CPAN distribution.

Report information
The Basics
Id: 23310
Status: resolved
Priority: 0/
Queue: Syntax-Highlight-HTML

People
Owner: Nobody in particular
Requestors: aljoscha [...] weisshuhn.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: "highlights" in Javascripts too
Date: Wed, 15 Nov 2006 14:21:39 +0100
To: bug-Syntax-Highlight-HTML [...] rt.cpan.org
From: Alexander Presber <aljoscha [...] weisshuhn.de>
HTML::Highlight seems to highlight in Scripts too: highlighting "go" in a document containing <script type="text/javascript"> ... function goUrl(selectId){ ... </script> yields ... function <B style="background-color: #ffff66; color:#000000">go</ Show quoted text
B>Url(selectId){
... Is Highlight not prevented from highlighting in script and style tags? Cheers, Alex
Subject: Re: [rt.cpan.org #23310] "highlights" in Javascripts too
Date: Wed, 15 Nov 2006 14:41:36 +0100
To: bug-Syntax-Highlight-HTML [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Hello, Show quoted text
> HTML::Highlight seems to highlight in Scripts too: highlighting "go" > in a document containing > [...] > Is Highlight not prevented from highlighting in script and style tags?
It is. When passing your example throught Syntax::Higlight::HTML, I have the following result : $ perl filter.pl rt-23310.html <pre> <span class="h-ab">&lt;</span><span class="h-tag">script</span> <span class="h-attr">type</span>=<span class="h-attv">"text/javascript</span>"<span class="h-ab">&gt;</span> ... function goUrl(selectId){ ... <span class="h-ab">&lt;/</span><span class="h-tag">script</span><span class="h-ab">&gt;</span> </pre> I don't know what transformed the JavaScript part in your case, but it cannot be Syntax::Higlight::HTML as it only generates <span> tags with CSS classes, and not an horrendous mix of HTML style tags and CSS rules. Regards, -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #23310] "highlights" in Javascripts too
Date: Wed, 15 Nov 2006 14:50:04 +0100
To: bug-Syntax-Highlight-HTML [...] rt.cpan.org
From: Alexander Presber <aljoscha [...] weisshuhn.de>
I am sorry, wrong Module. I have troubles with HTML::Highlight, not Syntax::Highlight::HTML. Thanks for your quick reply! Sincerely yours, Alex Am 15.11.2006 um 14:42 schrieb Sébastien Aperghis-Tramoni via RT: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=23310 > > > Hello, >
>> HTML::Highlight seems to highlight in Scripts too: highlighting "go" >> in a document containing >> [...] >> Is Highlight not prevented from highlighting in script and style >> tags?
> > It is. When passing your example throught Syntax::Higlight::HTML, I > have the > following result : > > $ perl filter.pl rt-23310.html > <pre> > <span class="h-ab">&lt;</span><span class="h-tag">script</span> <span > class="h-attr">type</span>=<span class="h-attv">"text/javascript</
> span>"<span
> class="h-ab">&gt;</span> > ... > function goUrl(selectId){ > ... > <span class="h-ab">&lt;/</span><span class="h-tag">script</span><span > class="h-ab">&gt;</span> > </pre> > > I don't know what transformed the JavaScript part in your case, but > it cannot be > Syntax::Higlight::HTML as it only generates <span> tags with CSS > classes, and > not an horrendous mix of HTML style tags and CSS rules. > > > Regards, > > -- > Sébastien Aperghis-Tramoni > > Close the world, txEn eht nepO. > >
Subject: Re: [rt.cpan.org #23310] "highlights" in Javascripts too
Date: Wed, 15 Nov 2006 14:57:33 +0100
To: bug-Syntax-Highlight-HTML [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Show quoted text
> I am sorry, wrong Module. > I have troubles with HTML::Highlight, not Syntax::Highlight::HTML.
Aha! Then the fix may be to switch to Syntax::Highlight::HTML :) I initially wrote it because I found HTML::Highlight quite hard to simply, well, highlight HTML. Syntax::Highlight::HTML is in contrast very easy to use, see the examples in the documentation and in the eg/ directory. Show quoted text
> Thanks for your quick reply!
You're welcome. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.