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

Added base64, image.png, wasm data: to image, (limited) support for namespaces (virtual map access). moved the image functions under image.* #217

Merged
merged 9 commits into from
Sep 7, 2024

Conversation

ldemailly
Copy link
Member

@ldemailly ldemailly commented Sep 6, 2024

@ldemailly ldemailly requested a review from ccoVeille September 6, 2024 19:37
@ldemailly ldemailly changed the title Add (limited) support for namespaces (virtual map access). move the image function under image.* Added base64, image.png, wasm data: to image, (limited) support for namespaces (virtual map access). moved the image functions under image.* Sep 6, 2024
Comment on lines +31 to +35
for _, b := range []byte(name) {
if !lexer.IsAlphaNum(b) {
return false
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually it's better to loop on runes from a string

Unicode characters such as accent, and emoji are badly checked otherwise

Then Unicode package can be used to check the type

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's on purpose (for now at least) only bytes (ascii) is allowed outside of strings

unicode does work fine inside strings (as demoed in many examples)

@@ -380,6 +380,7 @@ func EvalOne(ctx context.Context, s *eval.State, what string, out io.Writer, opt
}()
}
s.SetContext(ctx, options.MaxDuration)
defer s.Cancel()
Copy link
Member Author

@ldemailly ldemailly Sep 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix for the wasm errors! (#204 )

@ldemailly ldemailly merged commit c82ebac into main Sep 7, 2024
3 checks passed
@ldemailly ldemailly deleted the wasm_image branch September 7, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants