Grammalecte  Check-in [88574d8f98]

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

Overview
Comment:[core][fr][js][bug] no count method in JS (pfff)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr | core
Files: files | file ages | folders
SHA3-256:88574d8f98fba90ee0860f596674c7d0a67c00b1962d6a5c6cba1421a66b8bef
User & Date: olr 2019-07-22 20:29:01
Context
2019-07-22
20:50
[fr] tests et ajustements check-in: 8b2bff0e77 user: olr tags: fr, trunk
20:29
[core][fr][js][bug] no count method in JS (pfff) check-in: 88574d8f98 user: olr tags: core, fr, trunk
20:00
[core][fr] morphVC() update check-in: 02901ad6ae user: olr tags: core, fr, trunk
Changes

Changes to gc_lang/fr/modules-js/gce_analyseur.js.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// GRAMMAR CHECKING ENGINE PLUGIN: Parsing functions for French language

/* jshint esversion:6 */
/* jslint esversion:6 */

function g_morphVC (oToken, sPattern, sNegPattern="") {
    let nEnd = oToken["sValue"].lastIndexOf("-");
    if (oToken["sValue"].count("-") > 1) {
        if (oToken["sValue"].includes("-t-")) {
            nEnd = nEnd - 2;
        }
        else if (oToken["sValue"].search(/-l(?:es?|a)-(?:[mt]oi|nous|leur)$|(?:[nv]ous|lui|leur)-en$/) != -1) {
            nEnd = oToken["sValue"].slice(0,nEnd).lastIndexOf("-");
        }
    }







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// GRAMMAR CHECKING ENGINE PLUGIN: Parsing functions for French language

/* jshint esversion:6 */
/* jslint esversion:6 */

function g_morphVC (oToken, sPattern, sNegPattern="") {
    let nEnd = oToken["sValue"].lastIndexOf("-");
    if (oToken["sValue"].gl_count("-") > 1) {
        if (oToken["sValue"].includes("-t-")) {
            nEnd = nEnd - 2;
        }
        else if (oToken["sValue"].search(/-l(?:es?|a)-(?:[mt]oi|nous|leur)$|(?:[nv]ous|lui|leur)-en$/) != -1) {
            nEnd = oToken["sValue"].slice(0,nEnd).lastIndexOf("-");
        }
    }