remove built-in support for bbcode size
This commit is contained in:
parent
0a05c9ee8d
commit
b3a028acc0
|
@ -169,11 +169,6 @@ Discourse.BBCode.replaceBBCodeParamsRaw("email", function(param, contents) {
|
|||
return ['a', {href: "mailto:" + param, 'data-bbcode': true}].concat(contents);
|
||||
});
|
||||
|
||||
Discourse.BBCode.register('size', function(contents, params) {
|
||||
return ['span', {'class': "bbcode-size-" + (parseInt(params, 10) || 1)}].concat(contents);
|
||||
});
|
||||
Discourse.Markdown.whiteListTag('span', 'class', /^bbcode-size-\d+$/);
|
||||
|
||||
// Handles `[code] ... [/code]` blocks
|
||||
Discourse.Dialect.replaceBlock({
|
||||
start: /(\[code\])([\s\S]*)/igm,
|
||||
|
|
|
@ -13,10 +13,4 @@ span {
|
|||
&.bbcode-s {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
// Font sizes
|
||||
@for $i from 4 through 40 {
|
||||
&.bbcode-size-#{$i} {
|
||||
font-size: #{$i}px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,20 +62,6 @@ test('tags with arguments', function() {
|
|||
format("[b]first[/b] [b]second[/b]", "<span class=\"bbcode-b\">first</span> <span class=\"bbcode-b\">second</span>", "can bold two things on the same line");
|
||||
});
|
||||
|
||||
test("size tags", function() {
|
||||
format("[size=35]BIG [b]whoop[/b][/size]",
|
||||
"<span class=\"bbcode-size-35\">BIG <span class=\"bbcode-b\">whoop</span></span>",
|
||||
"supports [size=]");
|
||||
format("[size=asdf]regular[/size]",
|
||||
"<span class=\"bbcode-size-1\">regular</span>",
|
||||
"it only supports numbers in bbcode");
|
||||
format("[size=35]NEWLINE\n\ntest[/size]",
|
||||
"<span class=\"bbcode-size-35\"><p>NEWLINE</p><p>test</p></span>",
|
||||
"works with newlines");
|
||||
format("[size=35][quote=\"user\"]quote[/quote][/size]",
|
||||
"<span class=\"bbcode-size-35\"><aside class=\"quote\"><div class=\"title\"><div class=\"quote-controls\"></div>user:</div><blockquote><p>quote</p></blockquote></aside></span>",
|
||||
"works with nested complex blocks");
|
||||
});
|
||||
|
||||
test("quotes", function() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue