Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321099 - [Syntax Coloring] Mixed CSS and PHP file has problems with coloring
Summary: [Syntax Coloring] Mixed CSS and PHP file has problems with coloring
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Zhongwei Zhao CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 04:50 EDT by Sylvia Tancheva CLA
Modified: 2020-05-14 11:08 EDT (History)
2 users (show)

See Also:


Attachments
screen-shot (84.56 KB, image/png)
2010-07-28 04:50 EDT, Sylvia Tancheva CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvia Tancheva CLA 2010-07-28 04:50:08 EDT
Created attachment 175378 [details]
screen-shot

Take this code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> [^]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<script type="text/javascript" src="<?php echo $this->baseUrl()?>/lib/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl()?>/lib/jquery.dataTables.js"></script>

<style type="text/css">
 @IMPORT url("<?php echo $this->baseUrl()?>/css/demo_page.css");
 @IMPORT url("<?php echo $this->baseUrl()?>/css/demo_table.css");
</style>

<title>Insert title here</title>
</head>
<body>
<?php echo $this->layout()->content; ?>
</body>
</html>

There are some coloring problems on the css lines (see attached)
Comment 1 Zhongwei Zhao CLA 2010-07-28 09:52:38 EDT
This is because css url does not support embed script.

I found this in CSSTokenizer.jflex:

url = ([ !#$%&*-~]|{nonascii}|{escape})*
...
uri = ("url("{w}{string}{w}")"|"url("{w}{url}{w}")")

So this is not a pdt bug.
Comment 2 Q.S. Wang CLA 2010-08-09 23:26:18 EDT
 Added new StructuredDocumentDamagerRepairer class for handling the issue. Contributed by Zhongwei.
Comment 3 Roy Ganor CLA 2010-08-12 06:17:57 EDT
I still see the same behavior, but i am working on branch. have we backported it to branch as well?
Comment 4 Q.S. Wang CLA 2010-08-16 22:19:22 EDT
Are you using the piece of code attached here?  It looks all right.

Or what's your content of file?
Comment 5 Roy Ganor CLA 2010-08-17 04:39:07 EDT
got it now...

thanks!
Comment 6 Gadi Goldbarg CLA 2010-08-20 10:36:29 EDT
Verified fixed.
Kalin Yanev
kalin.a@zend.com