You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Rename MarshalVariable to MarshalValue
- Rename NewVariableEncoder to NewValueEncoder
- Rename VariableEncoder to ValueEncoder
- Rename VariableMarshaler to ValueMarshaler
- Rename MarshalTypstVariable to MarshalTypstValue
There are now wrappers which ensure compatibility with code that still uses some of the old functions/types.
- Improve image_test.go by adding an assertion
- Rename all occurrences of Variable to Value
- Remove "TODO: Handle images..." as that's already working with the image wrapper
- Update README.md
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Use at your own discretion for production systems.
20
20
21
21
- PDF, SVG and PNG generation.
22
22
- All Typst parameters are discoverable and documented in [cli-options.go](cli-options.go).
23
-
- Go-to-Typst Object Encoder: Seamlessly inject any Go values (Including `image.Image` with a [wrapper](image.go)) into Typst documents via the provided encoder.
23
+
- Go-to-Typst Value Encoder: Seamlessly inject any Go values (Including `image.Image` with a [wrapper](image.go)) into Typst documents via the provided encoder.
24
24
- Errors from Typst CLI are returned as structured Go error objects with detailed information, such as line numbers and file paths.
Copy file name to clipboardExpand all lines: image_test.go
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,9 @@ func TestImage(t *testing.T) {
48
48
49
49
r.WriteString(`= Image test
50
50
51
-
#TestImage`) // TODO: Add assertion for the image width and height as soon as it's possible to query that
51
+
#TestImage
52
+
53
+
#assert(type(TestImage) == content, message: "TestImage is not of expected type: got " + str(type(TestImage)) + ", want content")`) // TODO: Add another assertion for the image width and height as soon as it's possible to query that
0 commit comments