lemonmade / bigfoot

A jQuery plugin for creating exceptional footnotes.
http://www.bigfootjs.com
MIT License
936 stars 69 forks source link

Fix to avoid error when bigfoot.js is compressed/minified #28

Closed brunob closed 9 years ago

brunob commented 9 years ago

Hi @lemonmade here is a fix to avoid error when unminified version of the script is minified with an external tool :

https://github.com/lemonmade/bigfoot/blob/master/dist/bigfoot.js#L32

footnoteButtonSearchQuery = settings.scope ? "" + settings.scope + " a[href*=\"#\"]" : "a[href*=\"#\"]";

should be replaced with :

footnoteButtonSearchQuery = settings.scope ? '' + settings.scope + ' a[href*="#"]' : 'a[href*="#"]';

(like it's done in min version of the script)

brunob commented 9 years ago

Any news about this @lemonmade ?

lemonmade commented 9 years ago

Sorry for never replying to this. This issue is in the dist version of the script, which is compiled automatically from the CoffeeScript source. Since I have no control over that compilation, I lean towards not making any changes for this.

brunob commented 9 years ago

Thx for anwsering :) Sad that this can't be fixed, maybe we need to open a issue on CoffeeScript side ?

lemonmade commented 9 years ago

Can you see if the most recent version in this repo fixes the issue? I went to single quotes inside double quoted strings, which I think should resolve the minifier warnings.

brunob commented 9 years ago

(y) well done @lemonmade :)