Skip to content

Commit

Permalink
fix(plugin-comments): could not build correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
wstee committed Jun 1, 2023
1 parent eebb1f9 commit 24b84a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*giscus-theme-dark-start*/
/*!giscus-theme-dark-start*/
main {
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
Expand Down Expand Up @@ -189,4 +189,4 @@ main .gsc-loading-image {
.gsc-comment-author img {
@apply rounded !important;
}
/*giscus-theme-dark-end*/
/*!giscus-theme-dark-end*/
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*giscus-theme-light-start*/
/*!giscus-theme-light-start*/
.gsc-main {
--color-prettylights-syntax-comment: #6e7781;
--color-prettylights-syntax-constant: #0550ae;
Expand Down Expand Up @@ -188,4 +188,4 @@
.gsc-comment-author img {
@apply rounded !important;
}
/*giscus-theme-light-end*/
/*!giscus-theme-light-end*/
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ export const commentsPlugin = (): Plugin => {
encoding: 'utf8',
})
let lightdarkIndexStart = content.indexOf(
'/*giscus-theme-light-start*/'
'/*!giscus-theme-light-start*/'
)
let lightIndexEnd = content.indexOf('/*giscus-theme-light-end*/')
let lightIndexEnd = content.indexOf('/*!giscus-theme-light-end*/')
let darkdarkIndexStart = content.indexOf(
'/*giscus-theme-dark-start*/'
'/*!giscus-theme-dark-start*/'
)
let darkIndexEnd = content.indexOf('/*giscus-theme-dark-end*/')
let darkIndexEnd = content.indexOf('/*!giscus-theme-dark-end*/')
const giscusThemeLight = content.substring(
lightdarkIndexStart,
lightIndexEnd + 27
)
const giscusThemeDark = content.substring(
darkdarkIndexStart,
darkIndexEnd + 25
darkIndexEnd + 26
)
content = content.replace(giscusThemeLight, '')
content = content.replace(giscusThemeDark, '')
Expand Down

0 comments on commit 24b84a6

Please sign in to comment.