Skip to content

Commit b183127

Browse files
authored
Formatting fixes (typst-community#28)
- all indentations are two spaces - all files end with a newline - and no trailing whitespace
1 parent 5bbc060 commit b183127

File tree

5 files changed

+58
-58
lines changed

5 files changed

+58
-58
lines changed

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131
### Added
3232

3333
<!-- Describe the feature set of the initial release here -->
34-
-
35-
-
36-
-
34+
-
35+
-
36+
-
3737

3838
<!--
39-
Below are the target URLs for each version
40-
You can link version numbers (in level-2 headings)
41-
to the corresponding tag on GitHub, or the diff
42-
in comparison to the previous release
39+
Below are the target URLs for each version
40+
You can link version numbers (in level-2 headings)
41+
to the corresponding tag on GitHub, or the diff
42+
in comparison to the previous release
4343
-->
4444

4545
[Unreleased]: https://github.com/<author>/<my-package>/compare/v0.1.0...HEAD
46-
[0.1.0]: https://github.com/<author>/<my-package>/releases/tag/v0.1.0
46+
[0.1.0]: https://github.com/<author>/<my-package>/releases/tag/v0.1.0

Justfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ export TYPST_ROOT := root
44

55
[private]
66
default:
7-
@just --list --unsorted
7+
@just --list --unsorted
88

99
# generate manual
1010
doc:
11-
typst compile docs/manual.typ docs/manual.pdf
12-
typst compile docs/thumbnail.typ thumbnail-light.svg
13-
typst compile --input theme=dark docs/thumbnail.typ thumbnail-dark.svg
11+
typst compile docs/manual.typ docs/manual.pdf
12+
typst compile docs/thumbnail.typ thumbnail-light.svg
13+
typst compile --input theme=dark docs/thumbnail.typ thumbnail-dark.svg
1414

1515
# run test suite
1616
test *args:
17-
typst-test run {{ args }}
17+
typst-test run {{ args }}
1818

1919
# update test cases
2020
update *args:
21-
typst-test update {{ args }}
21+
typst-test update {{ args }}
2222

2323
# package the library into the specified destination folder
2424
package target:

scripts/package

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,40 +27,40 @@ readarray -t ignores < <(grep -v '^#' .typstignore | grep '[^[:blank:]]')
2727

2828
# recursively print all files that are not excluded via .typstignore
2929
function enumerate {
30-
local root="$1"
31-
if [[ -f "$root" ]]; then
32-
echo "$root"
33-
else
34-
local files
35-
readarray -t files < <(find "$root" \
30+
local root="$1"
31+
if [[ -f "$root" ]]; then
32+
echo "$root"
33+
else
34+
local files
35+
readarray -t files < <(find "$root" \
3636
-mindepth 1 -maxdepth 1 \
3737
-not -name .git \
3838
-not -name .typstignore)
39-
# declare -p files >&2
39+
# declare -p files >&2
4040

41-
local f
42-
for f in "${files[@]}"; do
43-
local include
44-
include=1
41+
local f
42+
for f in "${files[@]}"; do
43+
local include
44+
include=1
4545

46-
local ignore
47-
for ignore in "${ignores[@]}"; do
48-
if [[ "$ignore" =~ ^! ]]; then
49-
ignore="${ignore:1}"
50-
if [[ "$f" == ./$ignore ]]; then
51-
# echo "\"$f\" matched \"!$ignore\"" >&2
52-
include=1
53-
fi
54-
elif [[ "$f" == ./$ignore ]]; then
55-
# echo "\"$f\" matched \"$ignore\"" >&2
56-
include=0
57-
fi
58-
done
59-
if [[ "$include" == 1 ]]; then
60-
enumerate "$f"
61-
fi
62-
done
63-
fi
46+
local ignore
47+
for ignore in "${ignores[@]}"; do
48+
if [[ "$ignore" =~ ^! ]]; then
49+
ignore="${ignore:1}"
50+
if [[ "$f" == ./$ignore ]]; then
51+
# echo "\"$f\" matched \"!$ignore\"" >&2
52+
include=1
53+
fi
54+
elif [[ "$f" == ./$ignore ]]; then
55+
# echo "\"$f\" matched \"$ignore\"" >&2
56+
include=0
57+
fi
58+
done
59+
if [[ "$include" == 1 ]]; then
60+
enumerate "$f"
61+
fi
62+
done
63+
fi
6464
}
6565

6666
# List of all files that get packaged

scripts/setup

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ VERSION="$(read-toml "$ROOT/typst.toml" "version")"
2727
function resolve-target() {
2828
local target="$1"
2929

30-
if [[ "$target" == "@local" ]]; then
31-
echo "${DATA_DIR}/typst/packages/local"
32-
elif [[ "$target" == "@preview" ]]; then
33-
echo "${DATA_DIR}/typst/packages/preview"
34-
else
35-
echo "$target"
36-
fi
30+
if [[ "$target" == "@local" ]]; then
31+
echo "${DATA_DIR}/typst/packages/local"
32+
elif [[ "$target" == "@preview" ]]; then
33+
echo "${DATA_DIR}/typst/packages/preview"
34+
else
35+
echo "$target"
36+
fi
3737
}

typst.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ categories = []
1414
disciplines = []
1515
# compiler = ""
1616
exclude = [
17-
".github",
18-
"docs",
19-
"scripts",
20-
"tests",
21-
".typstignore",
22-
"Justfile",
23-
"thumbnail-dark.svg",
24-
"thumbnail-light.svg",
17+
".github",
18+
"docs",
19+
"scripts",
20+
"tests",
21+
".typstignore",
22+
"Justfile",
23+
"thumbnail-dark.svg",
24+
"thumbnail-light.svg",
2525
]
2626

2727
# [template]

0 commit comments

Comments
 (0)