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

Open text #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix syntax error
noahmayr authored Jan 2, 2023
commit 64824160e2b2a6845bb2772db567d09976e8eeb8
5 changes: 4 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
@@ -271,7 +271,10 @@ local function open(ctx)
return open_audio(node)
elseif node_mime == "application/pdf" then
return open_pdf(node)
elseif node_mime:match("^(text|application)/.*") and not (has_value(archive_mime_types, node_mime) or has_value(open_document_mime_types, node_mime) then
elseif node_mime:match("^text/.*") or
(node_mime:match("^application/.*") and
not (has_value(archive_mime_types, node_mime) or
has_value(open_document_mime_types, node_mime))) then
return open_text(node)
end