1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-05 04:45:46 +01:00

Fix io.source heredoc parsing in FF36. Closes issue #32.

This commit is contained in:
Kris Maglione
2010-09-29 11:46:02 -04:00
parent b711f928bf
commit de3d43292e

View File

@@ -362,11 +362,15 @@ lookup:
this.readHeredoc = function (end) {
let res = [];
for (let [i, line] in iter)
if (line === end)
return res.join("\n");
else
res.push(line);
try {
while (true)
let ([i, line] = iter.next()) {
if (line === end)
return res.join("\n");
res.push(line);
}
}
catch (e if e instanceof StopIteration) {}
dactyl.assert(false, "Unexpected end of file waiting for " + end);
};