Skip to content

Commit

Permalink
Add support for .dist files (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddebin committed Jun 2, 2020
1 parent a20af64 commit c735240
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions QLPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
<string>dyn.ah62d4rv4ge80g5pbrrwu</string> <!-- .cmake -->
<string>dyn.ah62d4rv4ge80g62</string> <!-- .cs -->
<string>dyn.ah62d4rv4ge80g6pq</string> <!-- .cql (Cassandra) -->
<string>dyn.ah62d4rv4ge80k4pxsu</string> <!-- .dist -->
<string>dyn.ah62d4rv4ge80n5dr</string> <!-- .elm -->
<string>dyn.ah62d4rv4ge80n65dsmy1a7a</string> <!-- .escript (Erlang) -->
<string>dyn.ah62d4rv4ge80n8a</string> <!-- .ex (Elixir) -->
Expand Down
3 changes: 3 additions & 0 deletions QLPlugin/Views/Previews/CodePreview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ class CodePreview: Preview {
if fileURL.pathExtension.isEmpty {
// Dotfile
return dotfileLexers[fileURL.lastPathComponent.lowercased(), default: "autodetect"]
} else if fileURL.pathExtension.lowercased() == "dist" {
// .dist file
return getLexer(fileURL: fileURL.deletingPathExtension())
} else {
// File with extension
return fileExtensionLexers[
Expand Down

0 comments on commit c735240

Please sign in to comment.