diff options
| author | Ellis KenyĆ <elken@users.noreply.github.com> | 2024-03-31 04:29:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-30 20:29:39 -0700 |
| commit | b776ed96b1a980af284c8fb07a8db387c1e6c358 (patch) | |
| tree | c570a6f8be6baaec003b884a1cad71cfc3fd0607 /scripts | |
| parent | c7040a6f6e60abf22225df91415df76f3f739cf1 (diff) | |
Prevent null issues when strings are unequal (#290)
In the case where s2 is larger than s1, this errors because the index is
out of range.
A good testcase is the below
```lisp
(apheleia--align-point
" <div class=\"left-[40rem] fixed inset-y-0 right-0 z-0 hidden lg:block xl:left-[50rem]\">\n <svg\n"
"<div class=\"left-[40rem] fixed inset-y-0 right-0 z-0 hidden lg:block xl:left-[50rem]\">\n <svg"
6)
```
If I've implemented the indexing wrong, do let me know but this seems to
work just fine now for `mix` (the formatter that triggered this)
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/check-line-length.bash | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/check-line-length.bash b/scripts/check-line-length.bash index 52a419c..20f66d9 100755 --- a/scripts/check-line-length.bash +++ b/scripts/check-line-length.bash @@ -9,6 +9,8 @@ find=( -name .log -prune -o -path ./scripts/pnp-bin.js -prune -o -path ./test/formatters -prune -o + -path ./test/unit -prune -o + -path ./vendor -prune -o -name "*.elc" -o -type f -print ) |
