Grammalecte  Diff

Differences From Artifact [79840617ea]:

To Artifact [2c21818f72]:


248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
    }

    * suggest (sWord, nSuggLimit=10) {
        // generator: returns 1, 2 or 3 lists of suggestions
        if (this.oDefaultSugg) {
            if (this.oDefaultSugg.hasOwnProperty(sWord)) {
                yield this.oDefaultSugg[sWord].split("|");
            } else if (sWord.gl_isTitle() && this.oDefaultSugg.hasOwnProperty(sWord.lower())) {
                let lRes = this.oDefaultSugg[sWord.toLowerCase()].split("|");
                yield lRes.map((sSugg) => { return sSugg.slice(0,1).toUpperCase() + sSugg.slice(1); });
            } else {
                yield this.oMainDic.suggest(sWord, nSuggLimit, true);
            }
        } else {
            yield this.oMainDic.suggest(sWord, nSuggLimit, true);







|







248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
    }

    * suggest (sWord, nSuggLimit=10) {
        // generator: returns 1, 2 or 3 lists of suggestions
        if (this.oDefaultSugg) {
            if (this.oDefaultSugg.hasOwnProperty(sWord)) {
                yield this.oDefaultSugg[sWord].split("|");
            } else if (sWord.gl_isTitle() && this.oDefaultSugg.hasOwnProperty(sWord.toLowerCase())) {
                let lRes = this.oDefaultSugg[sWord.toLowerCase()].split("|");
                yield lRes.map((sSugg) => { return sSugg.slice(0,1).toUpperCase() + sSugg.slice(1); });
            } else {
                yield this.oMainDic.suggest(sWord, nSuggLimit, true);
            }
        } else {
            yield this.oMainDic.suggest(sWord, nSuggLimit, true);