Jump to content

Markdown file filter


Recommended Posts

I make a file filter, set a scope and drag a .md file into the file type part of the basic setup. But it doesn't find any markdown files. However, if I change the extension to .markdown it works. It also works to change the extension to mdtxt or mdown

 

Just to be sure, I added a different filetype .taskpaper to check that I didn't bungle something easy - and that showed up just fine.

 

It gets the name "net.ia.markdown" in the File Types. I tried a cheeky adding of an object called "net.ia.md" to no avail.

 

Now I could rename all my markdown files from .md to .markdown, but I don't want to.

Link to comment

Probably a Launch Services issue. 

 

Your system doesn’t (properly) recognise .md as a Markdown extension.

 

Run mdls or Andrew’s metadata tool on a few .md file to see what the system thinks their UTI is.

 

The solution is to ensure that some application is registering .md with the correct UTI. You can create a do-nothing application with Xcode with the corresponding entries in info.plist.

Link to comment
1 minute ago, TheDonk said:

It still says it's a markdown file though, kMDItemKind = "Markdown". Doesn't matter much anyways, now that it works.

 

Your system does know about Markdown, then.

 

No idea where the com.unknown.markdown UTI has come from, but unless something has changed in High Sierra, macOS gives actually unknown types UTIs like dyn.ABCXYZ

 

If it matters, you can dump the Launch Services database to see what registered that UTI.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...