Skip to content

Instantly share code, notes, and snippets.

@kpozin
Created July 10, 2012 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kpozin/3083279 to your computer and use it in GitHub Desktop.
Save kpozin/3083279 to your computer and use it in GitHub Desktop.
Temporary workaround for parser bug in JSDoc Toolkit 3 / Rhino 1.7R3
/**
* @module plugins/removeUseStrict
* @author kpozin
*/
exports.handlers = {
beforeParse: function (e) {
e.source = e.source.replace(/(['"])use strict\1;/g, "");
}
};
@kpozin
Copy link
Author

kpozin commented Jul 10, 2012

Put this file in your plugins folder, and insert a reference into your JSDoc configuration file:

/* ... */
    "plugins": [
        "plugins/removeUseStrict"
    ],
/* ... */

@micmath
Copy link

micmath commented Jul 10, 2012

Clever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment