Skip to content

Commit 37a67e6

Browse files
committed
Use process function in autoloader
1 parent ab493ac commit 37a67e6

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

source/Parser.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ public function getDiscoveredCompilers()
8686
return [];
8787
}
8888

89-
public function process($from)
89+
public function process($from, $to = null, $format = true, $comment = true)
9090
{
91-
$to = preg_replace("/\.[a-zA-Z]+$/", ".php", $from);
91+
if (is_null($to)) {
92+
$to = preg_replace("/\.[a-zA-Z]+$/", ".php", $from);
93+
}
9294

9395
if (!$this->isProcessed($from, $to)) {
9496
$this->compile($from, $to);

source/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function ($class) {
3535
continue;
3636
}
3737

38-
compile($pre, $php, ($format = true), ($comment = true));
38+
process($pre, $php);
3939

4040
require_once $php;
4141
}

source/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ function instance() {
4242
}
4343

4444
if (!function_exists("\\Pre\\Plugin\\process")) {
45-
function process($from) {
45+
function process($from, $to = null, $format = true, $comment = true) {
4646
$instance = instance();
47-
return $instance->process($from);
47+
return $instance->process($from, $to, $format, $comment);
4848
}
4949
}
5050

0 commit comments

Comments
 (0)