parse markdown

This commit is contained in:
TomatoCake 2024-08-20 15:53:30 +02:00
parent 5d2d0267f9
commit 1618d15e8d

View file

@ -11,6 +11,7 @@ import { Role } from "./role.js";
import {InfiniteScroller} from "./infiniteScroller.js";
import { SnowFlake } from "./snowflake.js";
import { channeljson, messagejson, readyjson } from "./jsontypes.js";
import { MarkDown } from "./markdown.js";
declare global {
interface NotificationOptions {
@ -631,7 +632,7 @@ class Channel{
document.getElementById("channelname").textContent="#"+this.name;
if (this.topic) {
document.getElementById("channelTopic").textContent=this.topic;
document.getElementById("channelTopic").innerHTML=new MarkDown(this.topic, this).makeHTML().innerHTML;
document.getElementById("channelTopic").removeAttribute("hidden");
} else document.getElementById("channelTopic").setAttribute("hidden","");