Skip to content

Return extra boolean variable "is_binary" from via_content#1

Open
JoshuaS3 wants to merge 2 commits intowbond:masterfrom
JoshuaS3:master
Open

Return extra boolean variable "is_binary" from via_content#1
JoshuaS3 wants to merge 2 commits intowbond:masterfrom
JoshuaS3:master

Conversation

@JoshuaS3
Copy link

@JoshuaS3 JoshuaS3 commented Jan 3, 2021

With this, via_content will return two variables: mimetype and is_binary.

tests.lua has been updated to reflect this change.

Library function via_content will return a second new variable
is_binary. `true` if mime type is for binary format, `false` if not.

This shouldn't break any old code.
Also uses xpcall to get and report an error message and stack trace of
any puremagic library errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant