-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v5.0.0
- Loading branch information
Showing
1,542 changed files
with
55,646 additions
and
41,052 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ modules/canvas-kit-react-core/lib/colors.ts | |
.vscode | ||
.idea | ||
.travis.yml | ||
docs | ||
./docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
const path = require('path'); | ||
|
||
const basePath = path.resolve(__dirname, '../'); | ||
|
||
module.exports = function webpackLoaderRedirectMDXToGithub(source) { | ||
const {resourcePath} = this; | ||
return source.replace(/\[([^\]]+)\]\((\.\.?[^\)]+)\)/g, function replacer(match, p1, p2) { | ||
// extract the directory from the resourcePath given by Webpack | ||
const {dir} = path.parse(resourcePath); | ||
|
||
// We can't determine the root directory of the project since everyone might set a different base URL | ||
// The most common relative linking is between modules, so we'll split on that | ||
const [_, modulePath] = dir.split('modules'); | ||
const newPath = modulePath | ||
? '/modules' + path.resolve(`${modulePath}`, p2) | ||
: path.resolve('/', p2); | ||
const newPath = path.relative(basePath, path.resolve(dir, p2)); | ||
|
||
return `[${p1}](https://github.com/Workday/canvas-kit/blob/master${newPath})`; | ||
return `[${p1}](https://github.com/Workday/canvas-kit/blob/master/${newPath})`; | ||
}); | ||
}; |
Oops, something went wrong.