4 ms·
There's a "type" field in the spec, defined as: "The UTI of the text.* file. E.g. set to net.daringfireball.markdown for Markdown. This field should default to
by kemayo 2y ago
There's a "type" field in the spec, defined as: "The UTI of the text.* file. E.g. set to net.daringfireball.markdown for Markdown. This field should default to net.daringfireball.markdown to be backwards-compatible with version 1."
So it's whatever you care to specify. Doesn't have to be Markdown at all. It looks like it'd be completely valid to use this as a way to bundle up a webpage with all associated images and scripts, for instance.
- simonw 2y agoBut what does "net.daringfireball.markdown" mean? Does it mean "parse it using the 1.0.1 Perl script from 2004 on https://daringfireball.net/projects/markdown/ https://daringfireball.net/projects/markdown/ "?
- jagged-chisel 2y agoIt just means "the description written by Gruber at his domain." The Perl script is just a convenience (if one can call Perl convenient...) for the curious. Anyone else's flavor of Markdown can be used by specifying its identifier, e.g. "com.github.markdown.v3" (I made that up, it's not a real thing AFAIK)
- simonw 2y agoI don’t think the Gruber definition is specific enough for a spec like TextBundle that’s meant to be interoperable between different applications.
- jagged-chisel 2y agoPerhaps. But since TextBundle lets one specify the content type, you can always choose one that better suits your purposes.
- kemayo 2y agoIt seems fine to me. If your app is using weird edge cases of markdown syntax, or extensions, it should probably specify a different UTI. If you’re pretty much just doing the level of markdown in the average rich-notes app, that’s pretty interoperable.