File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050 # since AC may have been added to JSON, need to revalidate JSON and re-generate md
5151 python .validators\validator_json.py --output-md
5252
53+ - name : ⇅ Sort JSON
54+ working-directory : .
55+ if : ${{ contains('push workflow_dispatch', github.event_name) && github.ref == 'refs/heads/master' && github.repository == 'notepad-plus-plus/userDefinedLanguages' }}
56+ run : |
57+ # sort JSON back into string
58+ $file = "udl-list.json"
59+ $a = Get-Content $file | ConvertFrom-Json
60+ $a.'UDLs' = $a.'UDLs' | sort -Property 'id-name'
61+ $content = $a | ConvertTo-Json -Depth 5
62+ #
63+ # reformat JSON
64+ $content = $content -replace ': ', ": "
65+ $content = $content -replace ' ', " "
66+ $content = $content -replace ' ', " "
67+ $content = $content -replace ' ', " "
68+ #
69+ # save sorted JSON text
70+ $content > $file
71+
5372 - name : 🎉 Update repo with automated changes for the UDL list and autoCompletions
5473 uses : stefanzweifel/git-auto-commit-action@v7
5574 if : contains('push workflow_dispatch', github.event_name)
You can’t perform that action at this time.
0 commit comments