Closed sakanaproductions closed 8 years ago
I had the same issue; it's because of the nested PHP tags within the HTML tags. I opened this issue in the kangax/html-minifier repo and they updated it to include an option for ignoreCustomFragments
.
https://github.com/kangax/html-minifier/issues/421
-Garrett
I updated the wiki in this repo to reflect this fix (hope owner doesn't mind). Also, be sure to update to the latest version of html-minifier
.
-Garrett
Scratch that wiki update, just noticed the latest html-minifier
ignores those custom fragments by default.
-G
@grimmdude okay, updated html-minifier and now getting this:
events.js:141 throw er; // Unhandled 'error' event ^ Error: Parse Error: <a {...this.props} href="javascript:;" role="button" className={(this.props.className || '') + ' btn'} data-keyboard="true" /> ); } });
I think the issue is with those embedded quotes in the className
attribute. You'll need to write a regEx to ignore those {}
blocks and use is in the ignoreCustomFragments
option. Check this comment: https://github.com/kangax/html-minifier/issues/421#issuecomment-150911891
awesome, got it... i wasn't using Regex for ignoreCustomFragments
... thanks again.
I'm getting the following error when running the gulp compress from your wiki:
[21:03:45] Starting 'compress'...
events.js:141 throw er; // Unhandled 'error' event ^ Error: Parse Error: <a class="btn btn-primary navbar-btn" <?php echo e($modelItem->isCreatable() ? '' : 'disabled'); ?> href="<?php echo e($newEntryRoute); ?>"> <?php echo e(Lang::get('admin::lang.table.new-entry')); ?>