MCPcopy Create free account
hub / github.com/codecombat/codecombat / singleLineCommentOnlyRegex

Method singleLineCommentOnlyRegex

app/models/LevelSession.js:213–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211 }
212
213 singleLineCommentOnlyRegex () {
214 let commentStart
215 if (this.get('codeLanguage') === 'html') {
216 commentStart = `${commentStarts.html}|${commentStarts.css}|${commentStarts.javascript}`
217 } else {
218 commentStart = commentStarts[this.get('codeLanguage')] || '#'
219 }
220 return new RegExp(`^[ \t]*(${commentStart}).*$`, 'gm')
221 }
222 }
223 LevelSession.initClass()
224 return LevelSession

Callers 1

Calls 1

getMethod · 0.45

Tested by

no test coverage detected