Added support for tables

Signed-off-by: WolverinDEV <git@teaspeak.de>
canary
WolverinDEV 2019-12-21 15:53:19 +01:00
parent 070b7db45e
commit 91636f8082
No known key found for this signature in database
GPG Key ID: 77A6C15085150EEB
3 changed files with 33 additions and 5 deletions

View File

@ -1355,5 +1355,30 @@ $client_info_avatar_size: 10em;
max-height: 0;
}
}
/* special xbbcode formats */
.container-message .message {
hr {
border: none;
border-top: .125em solid #555;
margin-top: .1em;
margin-bottom: .1em;
}
table {
th, td {
border-color: #1e2025;
}
tr {
background-color: #303036;
}
tr:nth-child(2n) {
background-color: #25252a;
}
}
}
}
}

View File

@ -101,13 +101,16 @@ namespace MessageHelper {
"color",
"url",
"code",
"icode",
"i-code",
"i-code", "icode",
"sub", "sup",
"h1", "h2", "h3",
"size",
"hr",
"ul", "ol", "list",
"li",
"table",
"tr", "td", "th",
/* "img" */
] //[img]https://i.ytimg.com/vi/kgeSTkZssPg/maxresdefault.jpg[/img]
});

View File

@ -624,8 +624,8 @@ test
"code": (renderer: Renderer, token: RemarkToken) => "[i-code]" + xbbcode.escape(token.content) + "[/i-code]",
"fence": (renderer: Renderer, token: RemarkToken) => "[code" + (token.params ? ("=" + token.params) : "") + "]" + xbbcode.escape(token.content) + "[/code]",
"heading_open": (renderer: Renderer, token: RemarkToken) => "[h" + Math.min(3, token.hLevel) + "]",
"heading_close": (renderer: Renderer, token: RemarkToken) => "[/h" + Math.min(3, token.hLevel) + "]",
"heading_open": (renderer: Renderer, token: RemarkToken) => "[size=" + (9 - Math.min(4, token.hLevel)) + "]",
"heading_close": (renderer: Renderer, token: RemarkToken) => "[/size][hr]",
"hr": () => "[hr]",