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

fix: Updated Code + messages has macro name

This commit is contained in:
Saad Jutt
2021-04-07 16:38:43 +05:00
parent b87fb4dca6
commit 99aec59dd1
6 changed files with 149 additions and 120 deletions

View File

@@ -1,5 +1,4 @@
export const getLineNumber = (statements: string[], index: number): number => {
const combinedCode = statements.slice(0, index).join(';')
const lines = (combinedCode.match(/\n/g) || []).length + 1
return lines
export const getLineNumber = (lines: string[], index: number): number => {
const combinedCode = lines.slice(0, index).join('\n')
return (combinedCode.match(/\n/g) || []).length + 1
}