From 46827230725189e23d3ed5e860c0ca156baf2ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20M=C3=BCller?= Date: Tue, 10 Apr 2018 22:57:10 +0200 Subject: [PATCH 1/2] Fix broken fragment links to node documentation --- src/content/configuration/output.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/configuration/output.md b/src/content/configuration/output.md index 84d4916c5100..65a30f94e36a 100644 --- a/src/content/configuration/output.md +++ b/src/content/configuration/output.md @@ -250,7 +250,7 @@ The prefix length of the hash digest to use, defaults to `20`. `string|function` -The hashing algorithm to use, defaults to `'md5'`. All functions from Node.JS' [`crypto.createHash`](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) are supported. Since `4.0.0-alpha2`, the `hashFunction` can now be a constructor to a custom hash function. You can provide a non-crypto hash function for performance reasons. +The hashing algorithm to use, defaults to `'md5'`. All functions from Node.JS' [`crypto.createHash`](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options) are supported. Since `4.0.0-alpha2`, the `hashFunction` can now be a constructor to a custom hash function. You can provide a non-crypto hash function for performance reasons. ``` js hashFunction: require('metrohash').MetroHash64 @@ -260,7 +260,7 @@ Make sure that the hashing function will have `update` and `digest` methods avai ## `output.hashSalt` -An optional salt to update the hash via Node.JS' [`hash.update`](https://nodejs.org/api/crypto.html#crypto_hash_update_data_input_encoding). +An optional salt to update the hash via Node.JS' [`hash.update`](https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding). ## `output.hotUpdateChunkFilename` From 2bb81f8f86ade12af65c69a628b750fe3d6f0575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20M=C3=BCller?= Date: Wed, 11 Apr 2018 00:15:22 +0200 Subject: [PATCH 2/2] Don't resolve external README internal fragment identifier hrefs to raw.githubusercontent.com --- src/scripts/fetch_package_files.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/fetch_package_files.js b/src/scripts/fetch_package_files.js index 30cb1e374701..19737038f08a 100644 --- a/src/scripts/fetch_package_files.js +++ b/src/scripts/fetch_package_files.js @@ -87,8 +87,8 @@ function fetchPackageFiles(options, finalCb) { // Examples: // - [click here](LICENSE) --> [click here](https://raw.githubusercontent.com/user/repository/branch/LICENSE) // - [click here](./LICENSE) --> [click here](https://raw.githubusercontent.com/user/repository/branch/LICENSE) - // - [click here](#LICENSE) --> [click here](https://raw.githubusercontent.com/user/repository/branch#LICENSE) - .replace(/\[([^[\]]*)\]\(([^)]+)\)/g, (match, textContent, href) => `[${textContent}](${urlModule.resolve(url, href)})`) + // - [click here](#LICENSE) --> [click here](#LICENSE) + .replace(/\[([^[\]]*)\]\(([^)#]+)\)/g, (match, textContent, href) => `[${textContent}](${urlModule.resolve(url, href)})`) // Modify links to keep them within the site .replace(/https?:\/\/github.com\/(webpack|webpack-contrib)\/([-A-za-z0-9]+-loader\/?)([)"])/g, '/loaders/$2/$3') .replace(/https?:\/\/github.com\/(webpack|webpack-contrib)\/([-A-za-z0-9]+-plugin\/?)([)"])/g, '/plugins/$2/$3')