mirror of
https://github.com/sasjs/lint.git
synced 2026-01-09 13:30:05 +00:00
chore: quick fix
This commit is contained in:
@@ -48,8 +48,8 @@ describe('getDataSectionsDetail', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it(`should return the detail of data section when it begins and ends with '${datalinesBeginPattern4}' and '${datalinesEndPattern1}' markers`, () => {
|
||||
const text = `%put hello\n${datalinesBeginPattern4}\n${datalines}\n${datalinesEndPattern1}\n%put world;`
|
||||
it(`should return the detail of data section when it begins and ends with '${datalinesBeginPattern4}' and '${datalinesEndPattern2}' markers`, () => {
|
||||
const text = `%put hello\n${datalinesBeginPattern4}\n${datalines}\n${datalinesEndPattern2}\n%put world;`
|
||||
expect(getDataSectionsDetail(text, config)).toEqual([
|
||||
{
|
||||
start: 1,
|
||||
|
||||
@@ -11,10 +11,12 @@ export const getDataSectionsDetail = (text: string, config: LintConfig) => {
|
||||
const lines = splitText(text, config)
|
||||
|
||||
const dataSectionStartRegex1 = new RegExp(
|
||||
'^(datalines;)|(cards;)|(cards4;)|(parmcards;)'
|
||||
'^(datalines;)|(cards;)|(parmcards;)'
|
||||
)
|
||||
const dataSectionEndRegex1 = new RegExp(';')
|
||||
const dataSectionStartRegex2 = new RegExp('^(datalines4)|(parmcards4);')
|
||||
const dataSectionStartRegex2 = new RegExp(
|
||||
'^(datalines4;)|(cards4;)|(parmcards4;)'
|
||||
)
|
||||
const dataSectionEndRegex2 = new RegExp(';;;;')
|
||||
|
||||
let dataSectionStarted = false
|
||||
|
||||
Reference in New Issue
Block a user