Commit 0bc81a41 by Seldaek

* Lines containing only comments and whitespace are now entirely removed

git-svn-id: svn://dwoo.org/dwoo/trunk@176 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent c266d49f
......@@ -592,7 +592,10 @@ class Dwoo_Compiler implements Dwoo_ICompiler
// strips comments
if (strstr($tpl, $this->ld.'*') !== false) {
$tpl = preg_replace('/'.$this->ldr.'\*.*?\*'.$this->rdr.'/s', '', $tpl);
$tpl = preg_replace(
'/(\r?\n)[\t ]*'.$this->ldr.'\*.*?\*'.$this->rdr.'[\t ]*\r?\n|'.
$this->ldr.'\*.*?\*'.$this->rdr.'/s', '$1', $tpl
);
}
// strips php tags if required by the security policy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment