Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,3 @@ jobs:
./arkscript --version
mkdir -p std && mv *.ark std/
./arkscript --lib ./ tests/all.ark

update-docs:
runs-on: ubuntu-24.04
name: "Update website documentation"
needs: [ build ]

steps:
- name: Create repository dispatch event
if: github.ref == 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.WEBSITE_PUSH_COMMIT_GITHUB_TOKEN }}
run: |
gh api repos/ArkScript-lang/website/dispatches --raw-field event_type=my_update_docs
18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Update docs

on:
push:
branches: [ master ]

jobs:
update-docs:
runs-on: ubuntu-24.04
name: "Update website documentation"

steps:
- name: Create repository dispatch event
if: github.ref == 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.WEBSITE_PUSH_COMMIT_GITHUB_TOKEN }}
run: |
gh api repos/ArkScript-lang/website/dispatches --raw-field event_type=my_update_docs
4 changes: 2 additions & 2 deletions String.ark
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,9 @@
_edit_distances
_i
_j
(if (and (< (@ _dist 0) (@ _dist 1)) (< (@ _dist 0) (@ _dist 2)))
(if (and (<= (@ _dist 0) (@ _dist 1)) (<= (@ _dist 0) (@ _dist 2)))
(@ _dist 0)
(if (and (< (@ _dist 1) (@ _dist 0)) (< (@ _dist 1) (@ _dist 2)))
(if (and (<= (@ _dist 1) (@ _dist 0)) (<= (@ _dist 1) (@ _dist 2)))
(@ _dist 1)
(@ _dist 2))))
(set _j (+ 1 _j)) })
Expand Down
15 changes: 13 additions & 2 deletions tests/string-tests.ark
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,16 @@
(test:eq (string:levenshteinDistance "arkscript" "arkscript") 0)
(test:eq (string:levenshteinDistance "arkscript" "Orkscript") 1)
(test:eq (string:levenshteinDistance "arkscript" "0rCscript") 2)
(test:eq (string:levenshteinDistance "arkscript" "OrC") 8) })
})
(test:eq (string:levenshteinDistance "arkscript" "OrC") 8)
(test:eq (string:levenshteinDistance "before" "order") 5)
(test:eq (string:levenshteinDistance "time" "system") 5)
(test:eq (string:levenshteinDistance "state" "present") 6)
(test:eq (string:levenshteinDistance "square" "consider") 7)
(test:eq (string:levenshteinDistance "after" "carbohydrate") 10)
(test:eq (string:levenshteinDistance "dictionary" "general") 9)
(test:eq (string:levenshteinDistance "incomprehensible" "public") 14)
(test:eq (string:levenshteinDistance "under" "square") 5)
(test:eq (string:levenshteinDistance "there" "number") 5)
(test:eq (string:levenshteinDistance "there" "never") 4)
(test:eq (string:levenshteinDistance "structure" "interest") 8)
(test:eq (string:levenshteinDistance "possible" "public") 6) }) })
Loading