sS pb_extendScriptFromDB(S input) { new Set scriptsAdded; LS newText = ll(input); while licensed { bool change; new LS newText2; for (virtual Script s : pb_scriptsForKeywords(joinWithEmptyLines(newText))) if (scriptsAdded.add(s)) { newText2.add(getString text(s)); set change; } newText = newText2; if (!change) break; } ret joinWithEmptyLines(itemPlusList(input, collect text(scriptsAdded))); }