Skip to content

Commit fc4bc26

Browse files
chao5goclaude
andcommitted
fix: 修复 Gitignore 生成器 JavaScript 语法错误
将 GITIGNORE_TEMPLATES 对象中的字符串从单引号改为模板字符串(反引号),以支持多行字符串格式。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 41efa4d commit fc4bc26

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

tools/gitignore-generator/app.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -160,27 +160,27 @@ <h1>Gitignore 生成器</h1>
160160

161161
<script>
162162
const GITIGNORE_TEMPLATES = {
163-
node: 'node_modules/
163+
node: `node_modules/
164164
.DS_Store
165165
.npm
166166
.env
167-
',
168-
python: '__pycache__/
167+
`,
168+
python: `__pycache__/
169169
*.pyc
170170
.env
171171
.venv/
172-
',
173-
java: '*.class
172+
`,
173+
java: `*.class
174174
*.jar
175175
.target/
176-
',
177-
macos: '.DS_Store
176+
`,
177+
macos: `.DS_Store
178178
.AppleDouble
179-
',
180-
windows: 'Thumbs.db
179+
`,
180+
windows: `Thumbs.db
181181
Desktop.ini
182-
'
183-
};
182+
`
183+
};
184184

185185
function generateGitignore() {
186186
const selected = Array.from(document.querySelectorAll('.checkbox-group input:checked'))

0 commit comments

Comments
 (0)