File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ return (
435435Allow user configure the storage key for the provider and script. We now export
436436a ` createLocalStorageManager ` and ` createCookieStorageManager ` functions.
437437
438- ``` jsx
438+ ``` jsx live=false
439439const manager = createLocalStorageManager (" {storageKey}" )
440440
441441function App ({ Component, pageProps }) {
@@ -452,7 +452,7 @@ cookie script, you can set `type=cookie`.
452452
453453> Pro tip: You can also configure the ` storageKey ` from script as well
454454
455- ``` jsx
455+ ``` jsx live=false
456456import { ColorModeScript } from " @chakra-ui/react"
457457function Document () {
458458 return (
Original file line number Diff line number Diff line change @@ -4,11 +4,16 @@ const cwd = process.cwd()
44
55async function main ( ) {
66 const content = fs . readFileSync ( `${ cwd } /.changelogrc` ) . toString ( )
7+ // If "live=false" is missing in jsx snippet, add it!
8+ const noLiveContent = content . replace (
9+ / ^ ( ` ` ` j s x ) ( \s ? ) + $ / gim,
10+ "```jsx live=false" ,
11+ )
712 const changelogPath = `${ cwd } /CHANGELOG.md`
813 const changelog = await fs . promises . readFile ( changelogPath , "utf8" )
914 const newChangelog = changelog . replace (
1015 "<!-- CHANGELOG:INSERT -->" ,
11- `<!-- CHANGELOG:INSERT -->\n\n${ content } ` ,
16+ `<!-- CHANGELOG:INSERT -->\n\n${ noLiveContent } ` ,
1217 )
1318 // write new changelog
1419 await fs . promises . writeFile ( changelogPath , newChangelog )
You can’t perform that action at this time.
0 commit comments