npm/newww — pull request #473 by eiriksm (2014-12-29 12:22:31+00:00)
Title: Preserve query parameters in links when rendering README.

Hey guys!

Great work on the new website!

Just noticed on a package I was browsing (karma at the time) that URLs with query parameters gets their parameters stripped. Not sure if you do it on purpose, but reading the code, it seems the query parameter is supposed to be preserved. So here is a PR fixing that, including a test (which will fail without the fix applied, to prove my point).

Basically, this is the problem:

```
$ node
> var u = { protocol: 'http:',
... host: 'www.youtube.com',
... pathname: '/watch',
... search: 'v=dQw4w9WgXcQ',
... hash: null }
undefined
> u
{ protocol: 'http:',
host: 'www.youtube.com',
pathname: '/watch',
search: 'v=dQw4w9WgXcQ',
hash: null }
> url.format(u)
'http://www.youtube.com/watch?v=dQw4w9WgXcQ'
> u.query = u.search
'v=dQw4w9WgXcQ'
> delete u.search
true
> url.format(u)
'http://www.youtube.com/watch'
>
```

Yup. So keep up the good work && <3 npm

Oh and a nice holiday and new years to npm and contributors!