Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set raw theme to none #4182

Closed
1 task done
Coekjan opened this issue May 18, 2024 · 3 comments · Fixed by #4186
Closed
1 task done

Cannot set raw theme to none #4182

Coekjan opened this issue May 18, 2024 · 3 comments · Fixed by #4186
Labels
bug Something isn't working styling About set and show rules or style properties

Comments

@Coekjan
Copy link
Contributor

Coekjan commented May 18, 2024

Description

image

The document says raw.theme can be none or str, but when I compile the following code:

#set raw(theme: none)

it emits the error:

error: expected string, found none

Reproduction URL

No response

Operating system

No response

Typst version

  • I am using the latest version of Typst
@Coekjan Coekjan added the bug Something isn't working label May 18, 2024
@Coekjan
Copy link
Contributor Author

Coekjan commented May 18, 2024

It seems because parse_theme always wants to parse the arg into EcoString: https://github.com/typst/typst/blob/v0.11.1/crates/typst/src/text/raw.rs#L820

@Enivex
Copy link
Collaborator

Enivex commented May 18, 2024

Curiously, the default is none, so how is it working at all?

@Coekjan
Copy link
Contributor Author

Coekjan commented May 18, 2024

Curiously, the default is none, so how is it working at all?

I think it is because the bug is at argument parsing. The none behavior will work if the arg is parsed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working styling About set and show rules or style properties
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants