Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobjpeters committed May 30, 2024
1 parent 0e027f8 commit 5377107
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 43 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- Replace `typst_text` constructor with `TypstText` wrapper
- `show_typst`
- Implement `show_typst(x)` which prints to `stdout`
- Implemented for `AbstractArray`, `Tuple`, `Typst`, and `Unsigned`
- Implemented for `AbstractArray`, `Tuple`, `Typst`, `TypstText`, and `Unsigned`
- `nothing` now corresponds to Typst's `none`
- `AbtractMatrix` and `AbstractVector` in `code` mode now correspond to a Typst array
- `OrdinalRange{<:Integer, <:Integer}` and `StepRangeLen{<:Integer, <:Integer, <:Integer}`
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ open(strings * ".typ"; truncate = true) do file
if is_vector print(file, "\"[true, 1, Any[1.2, 1//2]]\"")
elseif v isa StepRangeLen print(file, "\"StepRangeLen(0, 2, 4)\"")
elseif v isa Text print(file, "\"text\\\"[\\\\\\\"a\\\\\\\"]\\\"\"")
elseif v isa Typst print(file, "\"Typst(1)\"")
elseif v isa TypstText print(file, "\"TypstText([1, 2, 3, 4])\"")
else show(file, repr(v))
end
Expand Down
125 changes: 103 additions & 22 deletions docs/src/assets/strings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5377107

Please sign in to comment.