1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-04 19:20:06 +00:00

fix: support single asterisk comment headers

This commit is contained in:
Allan Bowe
2023-01-10 10:37:32 +00:00
committed by GitHub
parent e6dc319844
commit 701c160ec1

View File

@@ -7,12 +7,12 @@ import { splitText } from './splitText'
export const getHeaderLinesCount = (text: string, config: LintConfig) => {
let count = 0
if (text.trimStart().startsWith('/**')) {
if (text.trimStart().startsWith('/*')) {
const lines = splitText(text, config)
for (const line of lines) {
count++
if (line.match(/\*\*\//)) {
if (line.match(/\*\//)) {
break
}
}