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

Function singleLineCommentRegex

app/core/aceUtils.js:80–88  ·  view source on GitHub ↗
(lang)

Source from the content-addressed store, hash-verified

78}
79
80const singleLineCommentRegex = function (lang) {
81 let commentStart
82 if (lang === 'html') {
83 commentStart = `${commentStarts.html}|${commentStarts.css}|${commentStarts.javascript}`
84 } else {
85 commentStart = commentStarts[lang] || '//'
86 }
87 return new RegExp(`[ \t]*(${commentStart})[^\''\n]*`) // eslint-disable-line no-useless-escape
88}
89
90const parseUserSnippets = function (source, lang, session) {
91 const replaceParams = function (str) {

Callers 1

parseUserSnippetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected