Grammalecte  Check-in [fbecdf6a89]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[graphspell][js][bug] fix wrong method
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256:fbecdf6a897aac6aaca94c7dd41d8c6551810fdf5fedcc889d5aa968e45d3a5f
User & Date: olr 2019-05-14 15:19:15
Context
2019-05-14
15:19
[graphspell] tokenizer: update for HOUR tokens check-in: 63672ef096 user: olr tags: graphspell, trunk
15:19
[graphspell][js][bug] fix wrong method check-in: fbecdf6a89 user: olr tags: graphspell, trunk
13:27
[core][fr][misc] change immunity tag (% -> !) check-in: d167d2a710 user: olr tags: core, fr, misc, trunk
Changes

Changes to graphspell-js/spellchecker.js.

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);