projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d12bb73
)
ConvertStyle.php
author
Edward
<edward@roojs.com>
Tue, 8 Jul 2014 05:31:47 +0000
(13:31 +0800)
committer
Edward
<edward@roojs.com>
Tue, 8 Jul 2014 05:31:47 +0000
(13:31 +0800)
ConvertStyle.php
patch
|
blob
|
history
diff --git
a/ConvertStyle.php
b/ConvertStyle.php
index
4179c51
..
265701d
100644
(file)
--- a/
ConvertStyle.php
+++ b/
ConvertStyle.php
@@
-68,6
+68,8
@@
class Pman_Core_ConvertStyle extends Pman
function convertStyle($url, $file, $is_url = true)
{
function convertStyle($url, $file, $is_url = true)
{
+ $inLineCss = true;
+
if($is_url && !empty($url))
{
$host = parse_url($url);
if($is_url && !empty($url))
{
$host = parse_url($url);
@@
-91,7
+93,7
@@
class Pman_Core_ConvertStyle extends Pman
}
if(preg_match('/^\s<!--\sNOT CONVERT STYLE\s-->\s/', $data)){
}
if(preg_match('/^\s<!--\sNOT CONVERT STYLE\s-->\s/', $data)){
-
return $data
;
+
$inLineCss = false
;
}
libxml_use_internal_errors (true);
}
libxml_use_internal_errors (true);
@@
-144,6
+146,10
@@
class Pman_Core_ConvertStyle extends Pman
$data = $doc->saveHTML();
$data = $doc->saveHTML();
+ if(!$inLineCss){
+ return $data;
+ }
+
$htmldoc = new HTML_CSS_InlineStyle($data);
if(count($this->styleSheets) > 0){
foreach ($this->styleSheets as $styleSheet){
$htmldoc = new HTML_CSS_InlineStyle($data);
if(count($this->styleSheets) > 0){
foreach ($this->styleSheets as $styleSheet){