From b5b8e7b00bb302bfd1c298569bdcea2d0750bef6 Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Wed, 11 Jan 2023 21:34:07 +0500 Subject: [PATCH] chore: quick fix --- .github/workflows/publish.yml | 4 ++-- src/utils/getDataSectionDetail.spec.ts | 4 ++-- src/utils/getDataSectionsDetail.ts | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ba6755b..6b3a969 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install Dependencies run: npm ci - name: Check Code Style @@ -21,7 +21,7 @@ jobs: - name: Build Project run: npm run build - name: Semantic Release - uses: cycjimmy/semantic-release-action@v2 + uses: cycjimmy/semantic-release-action@v3 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/src/utils/getDataSectionDetail.spec.ts b/src/utils/getDataSectionDetail.spec.ts index 3a1e07d..165af0a 100644 --- a/src/utils/getDataSectionDetail.spec.ts +++ b/src/utils/getDataSectionDetail.spec.ts @@ -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, diff --git a/src/utils/getDataSectionsDetail.ts b/src/utils/getDataSectionsDetail.ts index f637a0b..6466cb4 100644 --- a/src/utils/getDataSectionsDetail.ts +++ b/src/utils/getDataSectionsDetail.ts @@ -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