Grammalecte  Check-in [acb9d9f53e]

Overview
Comment:[core][js] gc engine: fix define_from
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | rg
Files: files | file ages | folders
SHA3-256: acb9d9f53ebaf720d1195f68e2ac3dc5949fa627cdbf307e18965528e7ad34e7
User & Date: olr on 2018-09-18 06:42:10
Other Links: branch diff | manifest | tags
Context
2018-09-18
06:42
[fr] ocr: suggestion mémo -> même check-in: 0c98f02962 user: olr tags: fr, rg
06:42
[core][js] gc engine: fix define_from check-in: acb9d9f53e user: olr tags: core, rg
2018-09-17
15:52
[core][js] gc engine: fix assignation to dErrorPriority check-in: b26ca44482 user: olr tags: core, rg
Changes

Modified gc_core/js/lang_core/gc_engine.js from [11104a6fa0] to [10319254e1].

  1356   1356   function g_define (dToken, lMorph) {
  1357   1357       // set morphologies of <dToken>, always return true
  1358   1358       dToken["lMorph"] = lMorph;
  1359   1359       return true;
  1360   1360   }
  1361   1361   
  1362   1362   function g_define_from (dToken, nLeft=null, nRight=null) {
         1363  +    let sValue = dToken["sValue"];
  1363   1364       if (nLeft !== null) {
  1364         -        dToken["lMorph"] = _oSpellChecker.getMorph(dToken["sValue"].slice(nLeft, nRight));
  1365         -    } else {
  1366         -        dToken["lMorph"] = _oSpellChecker.getMorph(dToken["sValue"]);
         1365  +        sValue = (nRight !== null) ? sValue.slice(nLeft, nRight) : sValue.slice(nLeft);
  1367   1366       }
         1367  +    dToken["lMorph"] = _oSpellChecker.getMorph(sValue);
  1368   1368       return true;
  1369   1369   }
  1370   1370   
  1371   1371   
  1372   1372   //////// GRAMMAR CHECKER PLUGINS
  1373   1373   
  1374   1374   ${pluginsJS}