browsersl.ist icon indicating copy to clipboard operation
browsersl.ist copied to clipboard

Add `,` and `#` support to multiline config

Open ai opened this issue 3 years ago • 1 comments

This config

> 1%,
last 2 versions

leads to Unknown browser query ""

https://browsersl.ist/?q=%3E+2%25%2C%2Clast+2+version

ai avatar Aug 18 '22 02:08 ai

Now we have a temporary solution https://github.com/browserslist/browsersl.ist/pull/435

The idea of the solution by @ai https://github.com/browserslist/browsersl.ist/pull/435#issuecomment-1218990106

  • [ ] Copy of algorithm https://github.com/browserslist/browserslist/blob/main/node.js#L285-L294
  • [ ] Preserve \n in URL so the multiline config can be copied by URL
  • [ ] Support comments

sashachabin avatar Aug 18 '22 03:08 sashachabin

+1 for this, our browserslist config has comments inside, and when we copy-paste it as is comments are treated like queries.

Is it in progress (with a bigger refactoring), or PRs are welcome to fix comments at least?

AleksandrSl avatar Jun 22 '23 15:06 AleksandrSl

@AleksandrSl no, it is not in a progress and PR is welcome

ai avatar Jun 22 '23 15:06 ai