FIX: Make getURL available to plugins while they are starting up in a similar load order

to the client app.
This commit is contained in:
Robin Ward
2013-08-29 13:11:12 -04:00
parent 425b59d381
commit eb5830f3b0
3 changed files with 20 additions and 13 deletions

View File

@@ -96,17 +96,17 @@ Discourse.Dialect = {
For example to replace all occurrances of :) with a smile image:
```javascript
```javascript
Discourse.Dialect.inlineReplace(':)', ['img', {src: '/images/smile.gif'}])
```
@method inlineReplace
@param {String} token The token we want to replace
@param {Array} jsonml The JsonML to replace it with.
@param {Function} emitter A function that emits the JsonML for the replacement.
**/
inlineReplace: function(token, jsonml) {
inlineReplace: function(token, emitter) {
dialect.inline[token] = function(text, match, prev) {
return [token.length, jsonml];
return [token.length, emitter.call(this, token)];
};
},