Skip to content

Commit 6637528

Browse files
authored
fix(injector): changed the judgement of whether it has been injected (hexojs#5573)
1 parent 1918cf4 commit 6637528

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/extend/injector.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Injector {
6666
}
6767

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

7171
const code = this.cache.apply(`${flag}-${currentType}-code`, () => {
7272
const content = currentType === 'default' ? this.getText(flag, 'default') : this.getText(flag, currentType) + this.getText(flag, 'default');

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@
6565
"warehouse": "^5.0.1"
6666
},
6767
"devDependencies": {
68-
"0x": "^5.1.2",
6968
"@types/abbrev": "^1.1.3",
7069
"@types/bluebird": "^3.5.37",
7170
"@types/chai": "^4.3.11",
7271
"@types/js-yaml": "^4.0.9",
73-
"@types/mocha": "^10.0.6",
74-
"@types/node": "^20.16.10",
72+
"@types/mocha": "^10.0.9",
73+
"@types/node": "^20.17.6",
7574
"@types/nunjucks": "^3.2.2",
7675
"@types/sinon": "^17.0.3",
7776
"@types/text-table": "^0.2.4",
77+
"0x": "^5.1.2",
7878
"c8": "^9.0.0",
7979
"chai": "^4.3.6",
8080
"cheerio": "0.22.0",

0 commit comments

Comments
 (0)