Closed andrewdworn closed 9 years ago
@andrewdworn Good idea. Thanks for the suggestion.
I have not copied your code. My package is completely written from scratch. Only the regex is the same in that single file.
I am only linking people else where if this package doesn't provide what they are asking for. I'm sorry. I'll stop posting links, and I'll add a comment in my blade compiler class with a link back to your regex. Also, the fact that my shouldMinify method even exists, or is similar is pure coincidence. That's a more recent refractor I made.
There we go: https://github.com/GrahamCampbell/Laravel-HTMLMin/commit/605ea736c3ad36e157c1be4db94fd3ba35394156. Again sorry about that @fitztrev. If that notice does not meet your attribution requirements, give me a buzz and I'll change it to whatever you want.
:+1:
A have some HTML code stored in database, so it doesn't get minified by this extension. I minify those separately, so I ended up creating a function for this purpose in my controller, which basically includes the regex part:
It would be much nicer, if I could access the same piece of code from the html-minify extension. It only requires a bit change in the
LaravelHtmlMinifyCompiler
class, something like this:So in this way, I could use
LaravelHtmlMinify::compileMinifyCore($html)
for my 'out of blade' data compression.