diff --git a/.github/workflows/temp.yml b/.github/workflows/temp.yml index efd2d36..e80f1af 100644 --- a/.github/workflows/temp.yml +++ b/.github/workflows/temp.yml @@ -6,9 +6,10 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - echo "{"keywords":[" > temp.json - cat temp | sed -E "s/(^|[^\\\\\\n])((\\\\\\\\)*) *\\#.+/\\1\\2/;s/(.+)/ {\"keyword\":\"\\1\"},/" >> temp.json - echo "]}" > temp.json + echo "{\"keywords\":[" > temp.json + cat temp | sed -E "s/(^|[^\\\\\\n])((\\\\\\\\)*) *\\#.+/\\1\\2/;$ ! s/(.+)/ {\"keyword\":\"\\1\"},/;$ s/(.+)/ {\"keyword\":\"\\1\"}/;/^ *$/d" >> temp.json + echo >> temp.json + echo "]}" >> temp.json git config --global user.name "Fabian42" git config --global user.email "Fabian42@users.noreply.github.com" git add . diff --git a/temp b/temp index 72f13e6..7ec5db5 100644 --- a/temp +++ b/temp @@ -8,4 +8,4 @@ foo \\# comment \\\# hash \\\\# comment -\\\\\# hash \ No newline at end of file +\\\\\# hashtesting \ No newline at end of file diff --git a/temp.json b/temp.json index d5107df..e4d7f6f 100644 --- a/temp.json +++ b/temp.json @@ -1,2 +1,13 @@ {"keywords":[ +<<<<<<< HEAD +======= + {"keyword":"test"}, + {"keyword":"abc"}, + {"keyword":"foo"}, + {"keyword":"\# hash"}, + {"keyword":"\\"}, + {"keyword":"\\\# hash"}, + {"keyword":"\\\\"}, + {"keyword":"\\\\\# hashtesting"} +>>>>>>> 4d781ad2c9a562e693caf5d259f933c8c575ff21 ]}