mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-08-04 09:58:52 +00:00
Mimic - don't crash if there's no source text
This commit is contained in:
@@ -27,6 +27,9 @@ process.stdin.on("end",function() {
|
||||
});
|
||||
|
||||
function mimic(sourceText,paramNgramLength) {
|
||||
if(!sourceText) {
|
||||
return "";
|
||||
}
|
||||
var tree = {};
|
||||
scanText(tree,sourceText,paramNgramLength);
|
||||
return generateText(tree,sourceText,paramNgramLength,paramOutputLength);
|
||||
|
||||
Reference in New Issue
Block a user