The text preview – for most files – relies on Spotlight importer plug-ins to extract file contents. Such importers are included with the system and installed with third party applications.
Please check which importer plug-in is used for .md files on your Mac:
1. Open /Applications/Utilities/Terminal.app
2. Type: “mdimport -d 4 “ (without the quotes, but with the trailing space)
3. Drag a .md file to the Terminal window. This will append its path to the above command
4. Hit Return
The mdimport command will index the file and output information about the process. Towards the end of the output you should find “kMDItemTextContent”. This is the text extracted from the file. This will be indexed by Spotlight and be searcheable. It is also the same text shown in the HoudahSpot Text Preview.
Scroll to the top of the mdimport output. It should says something like:
(Import.Debug:1338) file:/Users/…/README.md plugin:file:///System/Library/Spotlight/RichText.mdimporter/ /System/Library/Spotlight/RichText.mdimporter
I.e. on my Mac the Apple-provided RichText.mdimporter is used to process .md files. It manages to extract text content.
Houdah Software s.à r.l.
Houdah Software s. à r. l.
HoudahGeo: One-stop photo geocoding
HoudahSpot: Advanced file search utility
Tembo: Easy and effective file search