proposition to migrate to typst-0.13#8
Open
uGyomm wants to merge 1 commit into
Open
Conversation
to compare type to a string, use repr(type(....)) == "..." https://typst.app/docs/changelog/0.13.0#removals leads to 'style' removal , a context must be now defined explicitely
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
Object
As of the date of this pull request, the code doesn't compile.
It seems several breaking changes have been introduced which have impacted the compilation.
You will find below the identified changes and propositions to tackle them.
First Change
The style function and styles argument of measure have been removed.
As suggested by the change logs, I propose to remove their use and replace them by a context expression.
Second Change
The compatibility behavior of type/str comparisons (e.g. int == "integer") which was temporarily introduced in Typst 0.8, has been deprecated in Typst 0.13.0 and removed in Typst 0.14.0.
Here I propose to compare the returned value of type directly to the data type.
However it is also possible to compare the return value to a string if passed beforehand to the function repr.
examples :
By implementing these propositions, I have been able to compile using Typst 0.15.2.
I believe these propositions also resolve the issue #7 .
Best regards