Skip to content

Commit

Permalink
fix(injector): changed the judgement of whether it has been injected (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mRNA16 authored Dec 27, 2024
1 parent 1918cf4 commit 6637528
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/extend/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Injector {
}

_injector(input: string, pattern: string | RegExp, flag: Entry, isBegin = true, currentType: string): string {
if (input.includes(`hexo injector ${flag}`)) return input;
if (input.includes(`<!-- hexo injector ${flag}`)) return input;

const code = this.cache.apply(`${flag}-${currentType}-code`, () => {
const content = currentType === 'default' ? this.getText(flag, 'default') : this.getText(flag, currentType) + this.getText(flag, 'default');
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@
"warehouse": "^5.0.1"
},
"devDependencies": {
"0x": "^5.1.2",
"@types/abbrev": "^1.1.3",
"@types/bluebird": "^3.5.37",
"@types/chai": "^4.3.11",
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.6",
"@types/node": "^20.16.10",
"@types/mocha": "^10.0.9",
"@types/node": "^20.17.6",
"@types/nunjucks": "^3.2.2",
"@types/sinon": "^17.0.3",
"@types/text-table": "^0.2.4",
"0x": "^5.1.2",
"c8": "^9.0.0",
"chai": "^4.3.6",
"cheerio": "0.22.0",
Expand Down

0 comments on commit 6637528

Please sign in to comment.