-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: improve CodeSandbox integration (#4010)
- Loading branch information
1 parent
5532548
commit 8a37d8d
Showing
4 changed files
with
67 additions
and
20 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
4 changes: 2 additions & 2 deletions
4
docs/src/components/ComponentDoc/ComponentControls/enhanceExampleCode.js
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,8 +1,8 @@ | ||
const imagesRegex = /\/images\//gm | ||
const imagesRegex = /'\/images\//gm | ||
|
||
const enhanceExampleCode = (code) => { | ||
// To have absolute paths on CodeSandbox for images | ||
return code.replace(imagesRegex, 'https://react.semantic-ui.com/images/') | ||
return code.replace(imagesRegex, "'https://react.semantic-ui.com/images/") | ||
} | ||
|
||
export default enhanceExampleCode |
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