{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/25777","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/25777/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/25777/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/25777/events","html_url":"https://github.com/odoo/odoo/issues/25777","id":341338666,"node_id":"MDU6SXNzdWUzNDEzMzg2NjY=","number":25777,"title":"Asset pipeline cannot deal with js regex","user":{"login":"blaggacao","id":7548295,"node_id":"MDQ6VXNlcjc1NDgyOTU=","avatar_url":"https://avatars0.githubusercontent.com/u/7548295?v=4","gravatar_id":"","url":"https://api.github.com/users/blaggacao","html_url":"https://github.com/blaggacao","followers_url":"https://api.github.com/users/blaggacao/followers","following_url":"https://api.github.com/users/blaggacao/following{/other_user}","gists_url":"https://api.github.com/users/blaggacao/gists{/gist_id}","starred_url":"https://api.github.com/users/blaggacao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blaggacao/subscriptions","organizations_url":"https://api.github.com/users/blaggacao/orgs","repos_url":"https://api.github.com/users/blaggacao/repos","events_url":"https://api.github.com/users/blaggacao/events{/privacy}","received_events_url":"https://api.github.com/users/blaggacao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-15T17:48:24Z","updated_at":"2018-07-15T18:08:04Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Versions:\r\nV10, maybe others\r\n\r\nIn a library, this:\r\n```js\r\n  var nameStart = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\r\n\r\n  var nameBody = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\r\n\r\n  var entityStart = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\r\n  var entityBody = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\r\n\r\n  function isWhitespace (c) {\r\n    return c === ' ' || c === '\\n' || c === '\\r' || c === '\\t'\r\n  }\r\n\r\n```\r\nbecomes\r\n```js\r\nvar nameStart=/[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/var nameBody=/[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/var entityStart=/[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/var entityBody=/[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/function isWhitespace(c){return c===' '||c==='\\n'||c==='\\r'||c==='\\t'}\r\n```\r\n\r\nwhich is not valid javascript any more as the tokens after the `/` are interpreted as regex flags (which obviously is wrong)"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/405107832","html_url":"https://github.com/odoo/odoo/issues/25777#issuecomment-405107832","issue_url":"https://api.github.com/repos/odoo/odoo/issues/25777","id":405107832,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTEwNzgzMg==","user":{"login":"blaggacao","id":7548295,"node_id":"MDQ6VXNlcjc1NDgyOTU=","avatar_url":"https://avatars0.githubusercontent.com/u/7548295?v=4","gravatar_id":"","url":"https://api.github.com/users/blaggacao","html_url":"https://github.com/blaggacao","followers_url":"https://api.github.com/users/blaggacao/followers","following_url":"https://api.github.com/users/blaggacao/following{/other_user}","gists_url":"https://api.github.com/users/blaggacao/gists{/gist_id}","starred_url":"https://api.github.com/users/blaggacao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blaggacao/subscriptions","organizations_url":"https://api.github.com/users/blaggacao/orgs","repos_url":"https://api.github.com/users/blaggacao/repos","events_url":"https://api.github.com/users/blaggacao/events{/privacy}","received_events_url":"https://api.github.com/users/blaggacao/received_events","type":"User","site_admin":false},"created_at":"2018-07-15T18:08:04Z","updated_at":"2018-07-15T18:08:04Z","author_association":"CONTRIBUTOR","body":"Furthermore in the source you find this warning about the single regex approach:\r\n```python\r\n :Warning: This function is the digest of a _make_jsmin() call. It just\r\n              utilizes the resulting regexes. It's here for fun and may\r\n              vanish any time. Use the `jsmin` function instead.\r\n```\r\n\r\nThe function where this current odoo's approach is used in the original source is called: `jsmin_for_posers`."}}
{"actor":{"display_login":"blaggacao"}}