Allow basic emoticons to work too.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
@param {function} emitter the function that creates JsonML for the tag
|
||||
**/
|
||||
function replaceBBCode(tag, emitter) {
|
||||
Discourse.Dialect.inlineReplace({
|
||||
Discourse.Dialect.inlineBetween({
|
||||
start: "[" + tag + "]",
|
||||
stop: "[/" + tag + "]",
|
||||
emitter: emitter
|
||||
@@ -21,7 +21,7 @@ function replaceBBCode(tag, emitter) {
|
||||
@param {function} emitter the function that creates JsonML for the tag
|
||||
**/
|
||||
function replaceBBCodeParamsRaw(tag, emitter) {
|
||||
Discourse.Dialect.inlineReplace({
|
||||
Discourse.Dialect.inlineBetween({
|
||||
start: "[" + tag + "=",
|
||||
stop: "[/" + tag + "]",
|
||||
rawContents: true,
|
||||
@@ -59,21 +59,21 @@ replaceBBCode('li', function(contents) { return ['li'].concat(contents); });
|
||||
|
||||
replaceBBCode('spoiler', function(contents) { return ['span', {'class': 'spoiler'}].concat(contents); });
|
||||
|
||||
Discourse.Dialect.inlineReplace({
|
||||
Discourse.Dialect.inlineBetween({
|
||||
start: '[img]',
|
||||
stop: '[/img]',
|
||||
rawContents: true,
|
||||
emitter: function(contents) { return ['img', {href: contents}]; }
|
||||
});
|
||||
|
||||
Discourse.Dialect.inlineReplace({
|
||||
Discourse.Dialect.inlineBetween({
|
||||
start: '[email]',
|
||||
stop: '[/email]',
|
||||
rawContents: true,
|
||||
emitter: function(contents) { return ['a', {href: "mailto:" + contents, 'data-bbcode': true}, contents]; }
|
||||
});
|
||||
|
||||
Discourse.Dialect.inlineReplace({
|
||||
Discourse.Dialect.inlineBetween({
|
||||
start: '[url]',
|
||||
stop: '[/url]',
|
||||
rawContents: true,
|
||||
|
||||
Reference in New Issue
Block a user