-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebuild hyperlink #2382
Rebuild hyperlink #2382
Changes from 5 commits
b6fedfa
d0f9ed5
b70a775
958c136
fa437ea
63ae0bd
00e8fbc
a317676
12dccb7
de51fb0
42b9d84
adcd3bd
422e7fa
f400cd2
1c3ee46
fc4e876
b363414
bd227a8
ade9cb7
1a19c2d
071407e
73dec22
73779f7
43967dd
a8c6872
076dd73
2ef4cb9
4932f17
3ddaa42
2438e5b
710188c
972de53
ebede53
9e8fab8
42cb344
cabd893
5321534
7b20e07
21c589f
ab6f6c1
e48c836
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,6 @@ Use a different service URL in production/development builds: | |
|
||
```javascript | ||
new webpack.DefinePlugin({ | ||
'SERVICE_URL': JSON.stringify('http://dev.example.com') | ||
'SERVICE_URL': JSON.stringify('https://dev.example.com') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one seems unnecessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary, but showing a good example imo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah |
||
}); | ||
``` |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
module.exports = function processREADME(body) { | ||
const Url = require('url'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use |
||
|
||
module.exports = function processREADME(body, options = {}) { | ||
return body | ||
.replace(/[^]*?<div align="center">([^]*?)<\/div>/, (match, content) => { | ||
let parsed = content.match(/<p>([^]*?)<\/?p>/); | ||
|
@@ -11,6 +13,9 @@ module.exports = function processREADME(body) { | |
// 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') | ||
// Replace local github links with absolute links to the github location | ||
// EXAMPLE: [Contributing](./.github/CONTRIBUTING.md) | ||
.replace(/\[([^\]]*)\]\((\.[^)]+)\)/g, (markdownLink, content, href) => `[${content}](${Url.resolve(options.source, href)})`) | ||
// Replace any <h2> with `##` | ||
.replace(/<h2[^>]*>/g, '## ') | ||
.replace(/<\/h2>/g, '') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change tho 🌝