diff options
| author | Alon Levy <alon@pobox.com> | 2014-10-26 21:14:08 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-10-26 21:14:08 +0200 |
| commit | 078b019b26c750fac166a8126193bf2580344f14 (patch) | |
| tree | dfc6e6a74758e5c455bd915d8f24595c63291ce6 /scripts/textanalysis.js | |
| parent | 20e29d4746f7926045da491e4c4ec3463dfdd737 (diff) | |
textanalysis (#86): make star case avoid an empty string that was causing a chainlink temp node created from ''
Diffstat (limited to 'scripts/textanalysis.js')
| -rw-r--r-- | scripts/textanalysis.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js index aa7d2e04..e61bad6d 100644 --- a/scripts/textanalysis.js +++ b/scripts/textanalysis.js @@ -236,7 +236,10 @@ var textAnalyser2 = function (newtext, finalize) { } } - abnormalGraph = (newlinks.length - ANDcount) >= 3 || orderStack[orderStack.length - 1] != NODE; + abnormalGraph = (newlinks.length - ANDcount) >= 3 || + ((newlinks.length - ANDcount >= 1) && + orderStack.length > 1 && + orderStack[orderStack.length - 1] != NODE); //PREFIX not null case - put complete sentence in first link. if (prefix && !abnormalGraph) { |
