mirror of
https://github.com/sasjs/lint.git
synced 2026-01-19 10:10:05 +00:00
fix: support single asterisk comment headers
This commit is contained in:
@@ -7,12 +7,12 @@ import { splitText } from './splitText'
|
|||||||
export const getHeaderLinesCount = (text: string, config: LintConfig) => {
|
export const getHeaderLinesCount = (text: string, config: LintConfig) => {
|
||||||
let count = 0
|
let count = 0
|
||||||
|
|
||||||
if (text.trimStart().startsWith('/**')) {
|
if (text.trimStart().startsWith('/*')) {
|
||||||
const lines = splitText(text, config)
|
const lines = splitText(text, config)
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
count++
|
count++
|
||||||
if (line.match(/\*\*\//)) {
|
if (line.match(/\*\//)) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user