mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 01:37:58 +01:00
Hackier but more reliable literal() stuff.
This commit is contained in:
@@ -230,7 +230,10 @@ this.lazyRequire("util", ["FailedAssertion", "util"]);
|
||||
|
||||
literal.files = {};
|
||||
literal.locations = {};
|
||||
function literal(/* comment */) {
|
||||
function literal(comment) {
|
||||
if (comment)
|
||||
return /^function.*?\/\*([^]*)\*\/(?:\/\* use strict \*\/)\s*\S$/.exec(comment)[1];
|
||||
|
||||
let { caller } = Components.stack;
|
||||
while (caller && caller.language != 2)
|
||||
caller = caller.caller;
|
||||
|
||||
Reference in New Issue
Block a user