Bug#931379: => operator becomes = > thus creating syntax errors

積丹尼 Dan Jacobson jidanni at jidanni.org
Wed Jul 3 16:13:16 BST 2019


X-Debbugs-Cc: fayland at gmail.com
Package: libjavascript-beautifier-perl
Version: 0.25-1
Severity: grave
File: /usr/bin/js_beautify

js_beautify changes the => operator into = > thus creating syntax
errors, making one's code unusable.

fetch('https://example.com/').then(resp = >resp.blob()).then(blob = >{
    const url = window.URL.createObjectURL(blob);
    const a = document.createElement('a');
    a.style.display = 'none';
    a.href = url;
    // the filename you want
    a.download = 'z.html';
    document.body.appendChild(a);
    a.click();
    window.URL.revokeObjectURL(url);
    alert('your file has downloaded!');
}).
catch(() = >alert('oh no!'));



More information about the pkg-perl-maintainers mailing list