diff --git a/CHANGELOG b/CHANGELOG
index 7c37ece..7f7933e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,19 @@
+2.1.0:
+    * Add option to preview file as RTF  (thanks @silum).
+    * Add Kotlin/Gradle (thanks @sonique6784).
+    * Remove JSON support (thanks @erdtsksn).
+    * Add C# support.
+    * Add Scala support.
+    * Add "reduce_filesize" plugin by default.
+
+2.0.9:
+    * Add PHP/JS support (thanks @sloanlance).
+    * Add C#/F# support (thanks @breiter).
+    * Compile with XCode 9.0 targeting 10.13.
+
+2.0.8:
+    * Remove bash_ref_linuxmanpages_com plugin.
+
 2.0.7:
     * Correct autodetect path on 10.11 (thanks @cc941201).
     * Correct LaTeX and Arduino support.
diff --git a/Info.plist b/Info.plist
index 6fa78d0..2c46e89 100644
--- a/Info.plist
+++ b/Info.plist
@@ -12,6 +12,10 @@
 			<key>LSItemContentTypes</key>
 			<array>
 				<string>public.source-code</string>
+				<string>public.php-script</string>
+				<string>com.netscape.javascript-source</string>
+				<string>com.microsoft.c-sharp</string>
+				<string>com.microsoft.f-sharp</string>
 				<string>public.css</string>
 				<string>com.apple.applescript.script</string>
 				<string>public.xml</string>
@@ -21,6 +25,12 @@
 				<string>com.sun.java-class</string>
 				<string>org.vim.vim-script</string>
 				<string>public.tex</string>
+				<string>public.text</string>
+				<string>dyn.ah62d4rv4ge81g6pq</string>
+				<string>dyn.ah62d4rv4ge8007a</string>
+				<string>dyn.ah62d4rv4ge80s6xbqv0gn</string>
+				<string>dyn.ah62d4rv4ge81g25brvuu</string>
+				<string>dyn.ah62d4rv4ge80g62</string>
 			</array>
 		</dict>
 	</array>
@@ -255,6 +265,7 @@
 			<key>UTTypeConformsTo</key>
 			<array>
 				<string>public.source-code</string>
+				<string>dyn.ah62d4rv4ge81g6pq</string>
 			</array>
 			<key>UTTypeDescription</key>
 			<string>SQL Source File</string>
@@ -1035,6 +1046,40 @@
 				</array>
 			</dict>
 		</dict>
+		<dict>
+			<key>UTTypeConformsTo</key>
+			<array>
+				<string>dyn.ah62d4rv4ge8007a</string>
+			</array>
+			<key>UTTypeDescription</key>
+			<string>Kotlin Source File</string>
+			<key>UTTypeIdentifier</key>
+			<string>org.kotlinlang.source</string>
+			<key>UTTypeTagSpecification</key>
+			<dict>
+				<key>public.filename-extension</key>
+				<array>
+					<string>kt</string>
+				</array>
+			</dict>
+		</dict>
+		<dict>
+			<key>UTTypeConformsTo</key>
+			<array>
+				<string>dyn.ah62d4rv4ge80s6xbqv0gn</string>
+			</array>
+			<key>UTTypeDescription</key>
+			<string>Gradle Source File</string>
+			<key>UTTypeIdentifier</key>
+			<string>org.gradle.source</string>
+			<key>UTTypeTagSpecification</key>
+			<dict>
+				<key>public.filename-extension</key>
+				<array>
+					<string>gradle</string>
+				</array>
+			</dict>
+		</dict>
 	</array>
 </dict>
 </plist>
diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj
index 08bde83..d3f1bb1 100644
--- a/QLColorCode.xcodeproj/project.pbxproj
+++ b/QLColorCode.xcodeproj/project.pbxproj
@@ -24,7 +24,6 @@
 /* Begin PBXBuildFile section */
 		0ECBBA6C0CFCA37500416538 /* QLColorCode.qlgenerator in Copy to Library */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */; };
 		8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; };
-		8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; };
 		C86B05270671AA6E00DD9006 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C86B05260671AA6E00DD9006 /* CoreServices.framework */; };
 		EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */ = {isa = PBXBuildFile; fileRef = EA43671615F6BF9C009DA6C0 /* colorize.sh */; };
 		EA43671D15F6BF9C009DA6C0 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = EA43671715F6BF9C009DA6C0 /* Common.h */; };
@@ -206,7 +205,7 @@
 		089C1669FE841209C02AAC07 /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0730;
+				LastUpgradeCheck = 0940;
 			};
 			buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */;
 			compatibilityVersion = "Xcode 3.2";
@@ -233,7 +232,6 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */,
 				EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */,
 				EA43672515F6C00B009DA6C0 /* English.lproj in Resources */,
 				EA43672F15F6C1B8009DA6C0 /* CHANGELOG in Resources */,
@@ -297,21 +295,11 @@
 		};
 /* End PBXTargetDependency section */
 
-/* Begin PBXVariantGroup section */
-		8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-			);
-			name = InfoPlist.strings;
-			path = /Users/tony/Documents/Projects/qlcolorcode;
-			sourceTree = "<absolute>";
-		};
-/* End PBXVariantGroup section */
-
 /* Begin XCBuildConfiguration section */
 		0E0E34EA0D0097020086C1E6 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				COPY_PHASE_STRIP = NO;
 				GCC_DYNAMIC_NO_PIC = NO;
@@ -325,6 +313,7 @@
 		0E0E34EB0D0097020086C1E6 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				COPY_PHASE_STRIP = YES;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -338,6 +327,7 @@
 		2CA3261F0896AD4900168862 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				OTHER_CFLAGS = "-DDEBUG";
 			};
@@ -346,6 +336,7 @@
 		2CA326200896AD4900168862 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 			};
 			name = Release;
@@ -353,35 +344,50 @@
 		2CA326230896AD4900168862 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD)";
+				CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES;
+				CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
 				CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
 				CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
 				CLANG_ENABLE_MODULES = YES;
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
 				CLANG_WARN_ASSIGN_ENUM = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CXX0X_EXTENSIONS = YES;
 				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
 				CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
 				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
 				CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES;
 				CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
 				CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 2.0.7;
+				CURRENT_PROJECT_VERSION = 2.1.0;
 				DEAD_CODE_STRIPPING = YES;
 				DSTROOT = "/export/tmp/$(PROJECT_NAME).dst";
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				ENABLE_TESTABILITY = YES;
+				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
-				GCC_VERSION = "";
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
 				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+				GCC_WARN_PEDANTIC = YES;
 				GCC_WARN_SHADOW = YES;
 				GCC_WARN_SIGN_COMPARE = YES;
 				GCC_WARN_STRICT_SELECTOR_MATCH = YES;
@@ -393,14 +399,12 @@
 				GCC_WARN_UNUSED_PARAMETER = NO;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = /Library/QuickLook;
-				MACOSX_DEPLOYMENT_TARGET = 10.11;
+				MACOSX_DEPLOYMENT_TARGET = 10.13;
 				ONLY_ACTIVE_ARCH = YES;
 				PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode;
 				PRODUCT_NAME = QLColorCode;
 				RUN_CLANG_STATIC_ANALYZER = YES;
 				SDKROOT = macosx;
-				VALID_ARCHS = x86_64;
 				WRAPPER_EXTENSION = qlgenerator;
 			};
 			name = Debug;
@@ -408,32 +412,47 @@
 		2CA326240896AD4900168862 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD)";
+				CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES;
+				CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
 				CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
 				CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
 				CLANG_ENABLE_MODULES = YES;
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
 				CLANG_WARN_ASSIGN_ENUM = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CXX0X_EXTENSIONS = YES;
 				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
 				CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
 				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
 				CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES;
 				CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
 				CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				CURRENT_PROJECT_VERSION = 2.0.7;
+				CURRENT_PROJECT_VERSION = 2.1.0;
 				DEAD_CODE_STRIPPING = YES;
 				DSTROOT = "/export/tmp/$(PROJECT_NAME).dst";
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_VERSION = "";
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
 				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+				GCC_WARN_PEDANTIC = YES;
 				GCC_WARN_SHADOW = YES;
 				GCC_WARN_SIGN_COMPARE = YES;
 				GCC_WARN_STRICT_SELECTOR_MATCH = YES;
@@ -445,15 +464,12 @@
 				GCC_WARN_UNUSED_PARAMETER = NO;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = /Library/QuickLook;
-				LLVM_LTO = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.11;
+				MACOSX_DEPLOYMENT_TARGET = 10.13;
 				ONLY_ACTIVE_ARCH = YES;
 				PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode;
 				PRODUCT_NAME = QLColorCode;
 				RUN_CLANG_STATIC_ANALYZER = YES;
 				SDKROOT = macosx;
-				VALID_ARCHS = x86_64;
 				WRAPPER_EXTENSION = qlgenerator;
 			};
 			name = Release;
diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme
index 6bfb552..0148541 100644
--- a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme
+++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0700"
+   LastUpgradeVersion = "0940"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
diff --git a/README.md b/README.md
index 93cc961..8a6b1f6 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,8 @@
 This is a Quick Look plugin that renders source code with syntax highlighting,
 using the [Highlight library](http://www.andre-simon.de).
 
+To install Highlight, [download the library manualy](http://www.andre-simon.de/zip/download.php), or use homebrew `brew install highlight`
+
 To install the plugin, just drag it to `~/Library/QuickLook`.
 You may need to create that folder if it doesn't already exist.
 
@@ -20,19 +22,19 @@ Setting the text encoding (default is `UTF-8`).  Two settings are required.  The
 
     defaults write org.n8gray.QLColorCode textEncoding UTF-16
     defaults write org.n8gray.QLColorCode webkitTextEncoding UTF-16
-    
+
 Setting the font (default is `Menlo`):
 
     defaults write org.n8gray.QLColorCode font Monaco
-    
+
 Setting the font size (default is `10`):
 
     defaults write org.n8gray.QLColorCode fontSizePoints 9
-    
+
 Setting the color style (default is `edit-xcode`, see [all available themes](http://www.andre-simon.de/dokuwiki/doku.php?id=theme_examples)):
 
     defaults write org.n8gray.QLColorCode hlTheme ide-xcode
-    
+
 Setting the thumbnail color style (deactivated by default):
 
     defaults write org.n8gray.QLColorCode hlThumbTheme ide-xcode
@@ -44,7 +46,7 @@ Setting the maximum size (in bytes, deactivated by default) for previewed files:
 Setting any extra command-line flags for Highlight (see below):
 
     defaults write org.n8gray.QLColorCode extraHLFlags '-l -W'
-    
+
 Here are some useful 'highlight' command-line flags (from the man page):
 
        -F, --reformat=<style>
@@ -57,7 +59,7 @@ Here are some useful 'highlight' command-line flags (from the man page):
        -j, --line-number-length=<num>
               line number length incl. left padding
 
-       -l, --linenumbers
+       -l, --line-numbers
               print line numbers in output file
 
        -t  --replace-tabs=<num>
@@ -77,8 +79,14 @@ Here are some useful 'highlight' command-line flags (from the man page):
               control case of case insensitive keywords
 
 **Warning:** my fork uses an external `Highlight`. It will attempt to find `highlight` on your `PATH` (so it should work out of the box for homebrew and MacPorts), but if it can't find it, it'll use `/opt/local/bin/highlight` (MacPorts default). This can be changed:
-    
-    defaults write org.n8gray.QLColorCode pathHL /path/to/your/highlight 
+
+    defaults write org.n8gray.QLColorCode pathHL /path/to/your/highlight
+
+It is also possible to have the HTML preview converted to RTF.  Using RTF
+allows the contents of the file to be displayed instead of an icon -- similar
+to QLStephen.
+
+    defaults write org.n8gray.QLColorCode rtfRender true
 
 ## Additional information
 
@@ -88,9 +96,9 @@ Here are some useful 'highlight' command-line flags (from the man page):
 
 QLColorCode decompiles some formats:
 
-- **Java class**. It requires [jad](http://varaneckas.com/jad/) installed at `/usr/local/bin/jad`. 
+- **Java class**. It requires [jad](http://varaneckas.com/jad/) installed at `/usr/local/bin/jad`.
 - **Compiled AppleScript**. It requires `osadecompile` installed at `/usr/bin/osadecompile`.
-- **Binary PLIST**. It requires `plutil` installed at `/usr/bin/plutil`. 
+- **Binary PLIST**. It requires `plutil` installed at `/usr/bin/plutil`.
 
 ### Highlight
 
@@ -103,22 +111,71 @@ QLColorCode enables some Highlight plugins :
 - C/C++: `cpp_syslog`, `cpp_ref_cplusplus_com` and `cpp_ref_local_includes`.
 - Perl: `perl_ref_perl_org`.
 - Python: `python_ref_python_org`.
-- Shell: `bash_functions` and `bash_ref_linuxmanpages_com`.
+- Shell: `bash_functions`.
 - Scala: `scala_ref_scala_lang_org`.
 
 #### Handled languages
-Highlight can handle lots and lots of languages, but this plugin will only be 
+Highlight can handle lots and lots of languages, but this plugin will only be
 invoked for file types that the OS knows are type "source-code".  Since the OS
-only knows about a limited number of languages, I've added Universal Type 
-Identifier (UTI) declarations for several "interesting" languages.  If I've 
+only knows about a limited number of languages, I've added Universal Type
+Identifier (UTI) declarations for several "interesting" languages.  If I've
 missed your favorite language, take a look at the Info.plist file inside the
 plugin bundle and look for the UTImportedTypeDeclarations section.  I
 haven't added all the languages that Highlight can handle because it's rumored
 that having two conflicting UTI declarations for the same file extension can
-cause problems.  Note that if you do edit the Info.plist file you need to 
+cause problems.  Note that if you do edit the Info.plist file you need to
 nudge the system to tell it something has changed.  Moving the plugin to the
 desktop then back to its installed location should do the trick.
 
 As an aside, by changing colorize.sh you can use this plugin to render any file
 type that you can convert to HTML. Have fun, and let me know if you do anything
 cool!
+
+##### Adding Language Types
+
+If QLColorCode doesn't display PHP and JavaScript code properly, their types may
+need to be added to Info.plist.  Finding the right type string to use is the 
+tricky part.  Getting the type strings and getting Info.plist edits to take effect
+is easy by following the steps below, which explain how to add support for PHP:
+
+0. In Terminal.app (or any shell prompt), enter the command:
+  
+  ``` bash
+  mdls -name kMDItemContentType /full/path/to/file.php
+  ```
+  
+  Use the path to any PHP file.  The response will be:
+  
+  ``` txt
+  kMDItemContentType = "public.php-script"
+  ```
+  
+  The string `public.php-script` is the type string needed in a later step.
+  
+0. Again at a shell prompt, enter the command:
+  
+  ``` bash
+  open ~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist
+  ```
+  
+  This will open Info.plist in Xcode.app.
+  
+0. In Xcode.app's edit window for Info.plist, go to: 
+  
+  Document types > Item 0 > Document Content Type UTIs
+  
+  (If the editor is showing raw keys, that's:
+  CFBundleDocumentTypes > Item 0 > LSItemContentTypes)
+
+0. Add an item for `public.php-script`, the type string found in the first step.
+
+0. Save the updated Info.plist file.
+
+0. Try it in Finder.  (It's usually unnecessary to move/return the QLColorCode
+  extension, restart QuickLook, or restart the Finder, but it wouldn't be surprising
+  that some users might need to do so.)
+
+The Info.plist included with this version of QLColorCode already contains types
+for PHP and JavaScript code, but these steps show how easy it is to add other
+types.  (Maybe somebody will develop a Preference Pane for QLColorCode to make
+this even easier.)
diff --git a/rsrc/English.lproj/InfoPlist.strings b/rsrc/English.lproj/InfoPlist.strings
index 852fc68..12f77e3 100644
--- a/rsrc/English.lproj/InfoPlist.strings
+++ b/rsrc/English.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
 /* Localized versions of Info.plist keys */
 
-CFBundleGetInfoString = "QLColorCode version 2.0.7, Copyright (c) 2016 Nathaniel Gray, Anthony Gelibert.";
-NSHumanReadableCopyright = "Copyright (c) 2016 Nathaniel Gray, Anthony Gelibert.";
+CFBundleGetInfoString = "QLColorCode version 2.1.0, Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert.";
+NSHumanReadableCopyright = "Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert.";
 
diff --git a/src/Common.m b/src/Common.m
index 1c830bd..5efca97 100644
--- a/src/Common.m
+++ b/src/Common.m
@@ -4,7 +4,7 @@
  *
  *  Created by Nathaniel Gray on 12/6/07.
  *  Copyright 2007 Nathaniel Gray.
- *  
+ *
  *  Modified by Anthony Gelibert on 9/5/12.
  *  Copyright 2012 Anthony Gelibert.
  */
@@ -23,28 +23,28 @@ NSData *runTask(NSString *script, NSDictionary *env, int *exitCode) {
     [task setEnvironment:env];
     [task setLaunchPath:@"/bin/sh"];
     [task setArguments:[NSArray arrayWithObjects:@"-c", script, nil]];
-    
+
     NSPipe *pipe;
     pipe = [NSPipe pipe];
     [task setStandardOutput: pipe];
     // Let stderr go to the usual place
     //[task setStandardError: pipe];
-    
+
     NSFileHandle *file;
     file = [pipe fileHandleForReading];
-    
+
     [task launch];
-    
+
     NSData *data;
     data = [file readDataToEndOfFile];
     [task waitUntilExit];
-    
+
     *exitCode = [task terminationStatus];
     [task release];
     /* The docs claim this isn't needed, but we leak descriptors otherwise */
     [file closeFile];
     /*[pipe release];*/
-    
+
     return data;
 }
 
@@ -66,17 +66,17 @@ NSData *colorizeURL(CFBundleRef bundle, CFURLRef url, int *status, int thumbnail
     n8log(@"url = %@", url);
     NSString *targetEsc = pathOfURL(url);
     n8log(@"targetEsc = %@", targetEsc);
-    
+
     // Set up preferences
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-    
+
     NSMutableDictionary *env = [NSMutableDictionary dictionaryWithDictionary:
                                 [[NSProcessInfo processInfo] environment]];
 
     NSString *path = [env objectForKey: @"PATH"];
     NSString *newPath = [path stringByAppendingString: @":/usr/local/bin:/usr/local/sbin"];
     [env setObject: newPath forKey: @"PATH"];
-    
+
     // Try to find highlight location
     NSString *highlightPath = [[defaults persistentDomainForName:myDomain] valueForKey:@"pathHL"];
     if (highlightPath == nil) {
@@ -91,7 +91,7 @@ NSData *colorizeURL(CFBundleRef bundle, CFURLRef url, int *status, int thumbnail
         }
         [userDefaults release];
     }
-    
+
     [env addEntriesFromDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
 #ifdef DEBUG
                                    @"1", @"qlcc_debug",
@@ -99,15 +99,15 @@ NSData *colorizeURL(CFBundleRef bundle, CFURLRef url, int *status, int thumbnail
                                    @"10", @"fontSizePoints",
                                    @"Menlo", @"font",
                                    @"edit-xcode", @"hlTheme",
-//                                   @"-lz -j 3 -t 4 --kw-case=capitalize ", @"extraHLFlags", 
-                                   @"-t 4 --kw-case=capitalize ", @"extraHLFlags", 
+//                                   @"-lz -j 3 -t 4 --kw-case=capitalize ", @"extraHLFlags",
+                                   @"-t 4 --kw-case=capitalize ", @"extraHLFlags",
                                    @"/opt/local/bin/highlight", @"pathHL",
                                    @"", @"maxFileSize",
-                                   @"UTF-8", @"textEncoding", 
+                                   @"UTF-8", @"textEncoding",
                                    @"UTF-8", @"webkitTextEncoding", nil]];
 
     [env addEntriesFromDictionary:[defaults persistentDomainForName:myDomain]];
-    
+
     // This overrides hlTheme if hlThumbTheme is set and we're generating a thumbnail
     // (This way we won't irritate people with existing installs)
     // Admittedly, it's a little shady, overriding the set value, but I'd rather complicate the compiled code
@@ -119,10 +119,10 @@ NSData *colorizeURL(CFBundleRef bundle, CFURLRef url, int *status, int thumbnail
                      @"'%@/colorize.sh' '%@' '%@' %s",
                      rsrcEsc, rsrcEsc, [targetEsc stringByReplacingOccurrencesOfString:@"'" withString:@"'\\''"], thumbnail ? "1" : "0"];
     n8log(@"cmd = %@", cmd);
-    
+
     output = runTask(cmd, env, status);
     if (*status != 0) {
-        NSLog(@"QLColorCode: colorize.sh failed with exit code %d.  Command was (%@).", 
+        NSLog(@"QLColorCode: colorize.sh failed with exit code %d.  Command was (%@).",
               *status, cmd);
     }
     return output;
diff --git a/src/GeneratePreviewForURL.m b/src/GeneratePreviewForURL.m
index 087e89b..f3b991b 100644
--- a/src/GeneratePreviewForURL.m
+++ b/src/GeneratePreviewForURL.m
@@ -1,21 +1,22 @@
-/* This code is copyright Nathaniel Gray, licensed under the GPL v3.  
+/* This code is copyright Nathaniel Gray, licensed under the GPL v3.
     See LICENSE.txt for details. */
 
 #import <CoreFoundation/CoreFoundation.h>
 #import <CoreServices/CoreServices.h>
 #import <Foundation/Foundation.h>
 #import <QuickLook/QuickLook.h>
+#import <AppKit/AppKit.h>
 #import "Common.h"
 
 
 /* -----------------------------------------------------------------------------
  Generate a preview for file
- 
+
  This function's job is to create preview for designated file
  ----------------------------------------------------------------------------- */
 
-OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, 
-                               CFURLRef url, CFStringRef contentTypeUTI, 
+OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
+                               CFURLRef url, CFStringRef contentTypeUTI,
                                CFDictionaryRef options)
 {
 #ifdef DEBUG
@@ -24,34 +25,48 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
     n8log(@"Generating Preview");
     if (QLPreviewRequestIsCancelled(preview))
         return noErr;
-    
+
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    
+
     // Invoke colorize.sh
     CFBundleRef bundle = QLPreviewRequestGetGeneratorBundle(preview);
     int status;
     NSData *output = colorizeURL(bundle, url, &status, 0);
-    n8log(@"Generated preview html page in %.3f sec", 
+    n8log(@"Generated preview html page in %.3f sec",
           -[startDate timeIntervalSinceNow] );
-    
+
+    NSData *rtf = nil;
+    NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:myDomain];
+    BOOL use_rtf = [defaults boolForKey:@"rtfPreview"];
+    [defaults release];
+
+    if (use_rtf) {
+        NSDictionary *attrs;
+        NSAttributedString *string = [[NSAttributedString alloc] initWithHTML:output documentAttributes:&attrs];
+        NSRange range = NSMakeRange(0, [string length]);
+        rtf = [string RTFFromRange:range documentAttributes:attrs];
+        [string release];
+    }
+
     if (status != 0 || QLPreviewRequestIsCancelled(preview)) {
 #ifndef DEBUG
         goto done;
 #endif
     }
     // Now let WebKit do its thing
-    NSString *textEncoding = [[NSUserDefaults standardUserDefaults] 
+    NSString *textEncoding = [[NSUserDefaults standardUserDefaults]
                               stringForKey:@"webkitTextEncoding"];
     if (!textEncoding || [textEncoding length] == 0)
-        textEncoding = @"UTF-8";                
-    CFDictionaryRef properties = 
-            (CFDictionaryRef)[NSDictionary dictionaryWithObject:textEncoding 
+        textEncoding = @"UTF-8";
+    CFDictionaryRef properties =
+            (CFDictionaryRef)[NSDictionary dictionaryWithObject:textEncoding
                                                          forKey:(NSString *)kQLPreviewPropertyTextEncodingNameKey];
-    QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)output, 
-                                          //kUTTypePlainText,
-                                          kUTTypeHTML, 
-                                          properties);
-    
+
+    if (use_rtf)
+        QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)rtf, kUTTypeRTF, properties);
+    else
+        QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)output, kUTTypeHTML, properties);
+
 #ifndef DEBUG
 done:
 #endif
diff --git a/src/GenerateThumbnailForURL.m b/src/GenerateThumbnailForURL.m
index f9c5208..691eee6 100644
--- a/src/GenerateThumbnailForURL.m
+++ b/src/GenerateThumbnailForURL.m
@@ -14,12 +14,12 @@
    This function's job is to create thumbnail for designated file as fast as possible
    ----------------------------------------------------------------------------- */
 
-OSStatus 
-GenerateThumbnailForURL(void *thisInterface, 
-                                 QLThumbnailRequestRef thumbnail, 
-                                 CFURLRef url, 
-                                 CFStringRef contentTypeUTI, 
-                                 CFDictionaryRef options, 
+OSStatus
+GenerateThumbnailForURL(void *thisInterface,
+                                 QLThumbnailRequestRef thumbnail,
+                                 CFURLRef url,
+                                 CFStringRef contentTypeUTI,
+                                 CFDictionaryRef options,
                                  CGSize maxSize)
 {
     n8log(@"Generating Thumbnail");
@@ -31,16 +31,16 @@ GenerateThumbnailForURL(void *thisInterface,
 #ifdef DEBUG
     NSDate *startDate = [NSDate date];
 #endif
-    
-    // Render as though there is an 600x800 window, and fill the thumbnail 
+
+    // Render as though there is an 600x800 window, and fill the thumbnail
     // vertically.  This code could be more general.  I'm assuming maxSize is
     // a square, though nothing horrible should happen if it isn't.
-    
+
     NSRect renderRect = NSMakeRect(0.0, 0.0, 600.0, 800.0);
     float scale = (float)(maxSize.height/800.0);
     NSSize scaleSize = NSMakeSize(scale, scale);
     CGSize thumbSize = NSSizeToCGSize(
-                            NSMakeSize((maxSize.width * (600.0/800.0)), 
+                            NSMakeSize((maxSize.width * (600.0/800.0)),
                                        maxSize.height));
 
     /* Based on example code from quicklook-dev mailing list */
@@ -63,33 +63,33 @@ GenerateThumbnailForURL(void *thisInterface,
     WebView* webView = [[WebView alloc] initWithFrame:renderRect];
     [webView scaleUnitSquareToSize:scaleSize];
     [[[webView mainFrame] frameView] setAllowsScrolling:NO];
-    
+
     [[webView mainFrame] loadData:data MIMEType:@"text/html"
                  textEncodingName:@"UTF-8" baseURL:nil];
-    
+
     while([webView isLoading]) {
         CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true);
     }
-    
+
     // Get a context to render into
-    CGContextRef context = 
+    CGContextRef context =
         QLThumbnailRequestCreateContext(thumbnail, thumbSize, false, NULL);
-    
+
     if(context != NULL) {
-        NSGraphicsContext* nsContext = 
+        NSGraphicsContext* nsContext =
                     [NSGraphicsContext
-                        graphicsContextWithGraphicsPort:(void *)context 
+                        graphicsContextWithGraphicsPort:(void *)context
                                                 flipped:[webView isFlipped]];
-        
+
         [webView displayRectIgnoringOpacity:[webView bounds]
                                   inContext:nsContext];
-        
+
         QLThumbnailRequestFlushContext(thumbnail, context);
-        
+
         CFRelease(context);
     }
     [webView release];
-    
+
 #ifndef DEBUG
 done:
 #endif
@@ -100,7 +100,7 @@ done:
     return noErr;
 }
 
-void CancelThumbnailGeneration(void* thisInterface, 
+void CancelThumbnailGeneration(void* thisInterface,
                                QLThumbnailRequestRef thumbnail)
 {
     // implement only if supported
diff --git a/src/colorize.sh b/src/colorize.sh
index 202af95..526c3f5 100755
--- a/src/colorize.sh
+++ b/src/colorize.sh
@@ -4,7 +4,7 @@
 # This code is licensed under the GPL v3.  See LICENSE.txt for details.
 #
 # Copyright 2007 Nathaniel Gray.
-# Copyright 2012-2016 Anthony Gelibert.
+# Copyright 2012-2018 Anthony Gelibert.
 #
 # Expects   $1 = path to resources dir of bundle
 #           $2 = name of file to colorize
@@ -123,10 +123,10 @@ esac
 debug "Resolved ${target} to language $lang"
 
 go4it () {
-    cmdOpts=(${plugin} --plug-in outhtml_codefold --syntax=${lang} --quiet --include-style --font=${font} --font-size=${fontSizePoints} --style=${hlTheme} --encoding=${textEncoding} ${=extraHLFlags} --validate-input)
+    cmdOpts=(--plug-in reduce_filesize ${plugin} --plug-in outhtml_codefold --syntax=${lang} --quiet --include-style --font=${font} --font-size=${fontSizePoints} --style=${hlTheme} --encoding=${textEncoding} ${=extraHLFlags} --validate-input)
 
     debug "Generating the preview"
-    if [ ${thumb} = "1" ]; then
+    if [ "${thumb}" = "1" ]; then
         ${reader} | head -n 100 | head -c 20000 | ${cmd} ${cmdOpts} && exit 0
     elif [ -n "${maxFileSize}" ]; then
         ${reader} | head -c ${maxFileSize} | ${cmd} -T "${target}" ${cmdOpts} && exit 0
