Interestingly, that doesn't make Spotify URIs be picked up automatically
(without the use of PrettyLinks) - I haven't looked into this yet, but I
assume it's a load-order issue.
The following adds an additional formatter for that purpose:
---------------
/***
spotify:foo
[[bar|spotify:bar]]
***/
//{{{
config.textPrimitives.urlPattern = config.textPrimitives.urlPattern.
replace("data", "data|spotify");
config.formatters.push({
name: "spotifyLink",
match: "spotify:.+",
handler: function(w) {
w.outputText(createExternalLink(w.output,w.matchText),
w.matchStart,w.nextMatch);
}
});
//}}}
---------------
(There should be a more elegant solution though, e.g. reusing the
urlLink formatter - I might look into that another day).
-- F.
There is; simply re-evaluating the existing formatter's match pattern:
---------------
/***
spotify:foo
[[foo|spotify:foo]]
***/
//{{{
(function() {
config.textPrimitives.urlPattern = config.textPrimitives.urlPattern.
replace("data", "data|spotify");
var f = config.formatters.findByField("name", "urlLink");
config.formatters[f].match = config.textPrimitives.urlPattern;
})();
//}}}
---------------
However, I'm not entirely happy with that yet, as it should be easier to
extend the list of supported protocols.
That might be an issue for the dev group though...
-- F.