This repository was archived by the owner on Aug 26, 2024. It is now read-only.
fix for ['parser']['cache_dir'] and ['css'] - #16
Open
dwilbanks wants to merge 1 commit into
Open
Conversation
additional parameter ['css'] allows for passing to $this->Html->css() Corrected processing of ['parser']['cache_dir'] parameter to allow for $this->Html->css() to generate links with the correct path.
elboletaire
reviewed
Jan 5, 2017
elboletaire
left a comment
Owner
There was a problem hiding this comment.
If you can fix these things I'll try to add the test to check the behavior of the cache_dir working as expected.
|
|
||
| try { | ||
| $css = $this->compile($less, $options['cache'], $options['parser'], $modifyVars); | ||
| $cache_dir = isset($options['parser']['cache_dir']) ?$options['parser']['cache_dir']:""; |
Owner
There was a problem hiding this comment.
bad indentation there + missing spaces in concatenation. BTW, this will be better inside a custom function, so we can properly test the cache behavior.
| } else { | ||
| $options['cache_dir'] = trim($this->cssPath, '/') . $options['cache_dir']; | ||
| } | ||
| return \Less_Cache::Get($parse, $options, $modifyVars); |
Owner
There was a problem hiding this comment.
There are spaces + tabs in many of these lines. Also, the spaces of the if are not properly set and you should avoid using else if. Instead use elseif.
It's also recommendable not to use else. Better define the variable before as a fallback.
| } | ||
|
|
||
| if (empty($options['css'])) { | ||
| $options['css'] = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
additional parameter ['css'] allows for passing to $this->Html->css()
Corrected processing of ['parser']['cache_dir'] parameter to allow for $this->Html->css() to generate links with the correct path.