MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / getMark

Function getMark

Rewrite-Parser.js:1975–1990  ·  view source on GitHub ↗
(index, obj)

Source from the content-addressed store, hash-verified

1973
1974//获取当前内容的注释
1975function getMark(index, obj) {
1976 let mark = obj[index - 1]?.match(/^#(?!!)/) ? obj[index - 1] + '\n' : ''
1977 // let mark = ''
1978
1979 // for (let i = index - 1; i >= 0; i--) {
1980 // const line = obj[i].trim()
1981
1982 // if (/(^#(?!!)|^\s*$)/.test(line)) {
1983 // mark = line + '\n' + mark
1984 // } else {
1985 // break
1986 // }
1987 // }
1988
1989 return mark
1990}
1991
1992function getArgArr(str) {
1993 let arr = str.split('+')

Callers 1

Rewrite-Parser.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected