This commit is contained in:
Alexey Kudravtsev
2012-02-27 16:58:36 +04:00
parent 70af35eb2e
commit 82440c760f
@@ -270,9 +270,12 @@ public class MyTestInjector {
String t = s.trim();
if (t.startsWith("*")) t = t.substring(1).trim();
int i = s.length() - t.length();
placesToInject.addPlace(js, TextRange.from(prefix.length() + off, i), "", "\n");
off += i;
s = s.substring(i);
int endOfLine = t.indexOf('\n');
if (endOfLine == -1) endOfLine = t.length();
placesToInject.addPlace(js, TextRange.from(prefix.length() + off, endOfLine), "", "\n");
off += endOfLine;
s = s.substring(i+endOfLine);
}
return;
}