Did you update Chrome App version last week?

Posted on
  • Hello @Gordon
    my Chrome app is web ide 0.73.7

    last week? or 2 week ago (don't remember)
    i was working with a code in espruino that work great.
    when i attempt to upload to my espruino pico (just modifying a typo)
    the ide return:

    ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v05.100 (c) 2019 G.Williams
    >Uncaught SyntaxError: Got ?[233] expected ID
     at line 1 col 289
    ...t+1','eu+2','ev+2','ez+1'],?[233]:['?­[233] ?[226]+1','?[233] c+1','?[233] e+1','?[233] j+1','?[233]...
    

    same firmware, same espruino pico...

    the part code is about accents (yes again!)
    i do not have this pb on June 8th!

    have an idea?
    thanks

    i use custom font (no web ide) :/

    const aKerning = {
       'a':["ad+1","al-1","af-1","ag+0","ai-1",­"am+0","an-1","ap-1","ar-1","au+1","as+0­","av+1"]
      ,'b':["bi-1","bl-1","bo+0","br-1","bs-1"­]
      ,'c':["ci-1","cl-1","cu+1"]
      ,'d':["de+1","di+0","dr+0","du+1","d'+1"­]
      ,'e':["ea+1","eb+1","ec+1","eg+1","ep-1"­,"er+1","es+1","et+1","eu+2","ev+2","ez+­1"]
      ,'é':["éâ+1","éc+1","ée+1","éj+1","éo+1"­,"ép-1","ér+0","és+1","ét+1","év+2"]
      ,'è':["ès+1","èt+1"]
      ,'ê':["êt+1"]
      ,'Ê':["Êt-1"]
      ,'f':["fe+1","ff-1","fl+0","fo+1","fu+2"­]
      ,'g':["gi-1","gn+0","gl-1","gu+1"]
      ,'h':["hi-1","hr-1"]
      ,'i':["iA+1","ib+1","ic+1","id+1","ie+1"­,"ié+1","iè+1","ig+1","io+1","iq+2","ir+­1","is+1","it+1","iv+2","ix+1","iz+1"]
      ,'j':["ju+1"]
      ,'k':["k-+2"]
      ,'l':["lé+0","li-1","ll-1","lv+1","l'+1"­]
      ,'m':["ma+0","mb+0","mi+0","mm-1","mp-2"­,"mu+1"]
      ,'n':["na+1","nc+1","nd+1","ne+1","né+1"­,"nj+1","nn+0","no+1","nt+1","nv+2","nu+­2"]
      ,'o':["ob+1","oc+1","od+2","oe-1","oè+1"­,"og+1","oo+1","om+1","op-1","os+1","ot+­1","ou+2","ow+1"]
      ,'ô':["ôt+1"]
      ,'p':["pé+0","pi-1","ph-1","pl-1","po+0"­,"pp-2","pr-1"]
      ,'q':["qu+0"]
      ,'r':["ré+0","rg-1","ri-1","rl-1","rm-1"­,"rn+0","rr-2","rs+1","ru+1","rv+1"]
      ,'s':["sa+1","sc+1","se+1","so+1","sp-1"­,"sq+1","st+1","su+1"]
      ,'t':["ta+0","té+0","th-1","ti-1","tr-1"­]
      ,'u':["ud+1","ue+1","ui+0","ul+0","um+0"­,"un-1","up-1","uq+1","ut+1","uv+1"]
      ,'v':["va-1","ve-1","vi-1","vo-1","vr-1"­]
      ,'w':["wh+0","wr-1"]
      ,'x':[]
      ,'y':["yn-1","ys-1"]
      ,'z':["z-+1"]
    };
    
  • the error is on the key ("é" of my array), not the content with accent.
    if i remove the key with accents, everythings is good (there is accent in the content, see in 'i' key

    strange!

    é.

  • found a way to declare my accents, by using their ascii code (but it's less readable by human)

    ,'233':["éâ+1","éc+1","ée+1","éj+1","éo+­1","ép-1","ér+0","és+1","ét+1","év+2"]
      ,'232':["ès+1","èt+1"]
      ,'234':["êt+1"]
      ,'202':["Êt-1"]
    
  • Bravo!

  • the problem is: it was working, but not now!
    why?

  • Hi, Yes - there was definitely an IDE app update the week before last. Users of espruino.com/ide had had been using it for a while - it was just the chrome app that was lagging behind.

    To be honest any changes that went in should really have helped with non-ASCII characters since we're using them more in Bangle.js now.

    It looks from the error like maybe you had minification enabled? I'm not sure but that could be having some effect? Does it help turning minification off?

  • Hello @Gordon,
    nope, minification does not help.
    i'll write my own toUpperCaseDiacritic()

    thanks
    é.

  • nope, minification does not help.

    I mean, turn minification off.

    If I upload the code you posted to https://www.espruino.com/ide/emulator.ht­ml then it uploads fine.

    However if I turn minification on then it fails with exactly the error you report.

    It looks like minification turned:

    'é':["éâ+1","éc+1","ée+1","éj+1","éo+1",­"ép-1","ér+0","és+1","ét+1","év+2"]
    

    into

    é:["éâ+1","éc+1","ée+1","éj+1","éo+1","é­p-1","ér+0","és+1","ét+1","év+2"]
    

    Which Espruino doesn't like because it isn't expecting non-ASCII variable names.

  • ok, thanks for your time.

    i extend toUpperCase() to upperCase French diacritic accents

    String.prototype.toUpperCaseFr = function toUpperCaseFr() {
        return this.toUpperCase().replace(/à/gm, "À").replace(/â/gm, "Â").replace(/é/gm, "É").replace(/è/gm, "È").replace(/ê/gm, "Ê").replace(/ë/gm, "Ë").replace(/î/gm, "Î").replace(/ï/gm, "Ï").replace(/ô/gm, "Ô").replace(/ö/gm, "Ö").replace(/û/gm, "Û").replace(/ü/gm, "Ü").replace(/ù/gm, "Ù").replace(/ç/gm, "Ç").replace(/œ/gm,"Œ");
    };
    

    it's working.

    é.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Did you update Chrome App version last week?

Posted by Avatar for Mrbbp @Mrbbp

Actions