With Ib6bc76736 in place, we have access to lessphp's custom function helpers,
which provide some nice encapsulation for interpreter internals like boolean
nodes. This patch makes embeddable() call $less->toBool() rather than construct
its own AST nodes.
Change-Id: I0a015564dff19f5ced764af182558eb351e3d816
$base = pathinfo( $less->parser->sourceName, PATHINFO_DIRNAME );
$url = $frame[2][0];
$file = realpath( $base . '/' . $url );
- $embeddable = ( $file
+ return $less->toBool( $file
&& strpos( $url, '//' ) === false
&& filesize( $file ) < CSSMin::EMBED_SIZE_LIMIT
- && CSSMin::getMimeType( $file ) !== false ) ? 'true' : 'false';
- return array( 'keyword', $embeddable );
+ && CSSMin::getMimeType( $file ) !== false );
}
/**