parse markdown
This commit is contained in:
@@ -11,6 +11,7 @@ import { Role } from "./role.js";
|
|||||||
import {InfiniteScroller} from "./infiniteScroller.js";
|
import {InfiniteScroller} from "./infiniteScroller.js";
|
||||||
import { SnowFlake } from "./snowflake.js";
|
import { SnowFlake } from "./snowflake.js";
|
||||||
import { channeljson, messagejson, readyjson } from "./jsontypes.js";
|
import { channeljson, messagejson, readyjson } from "./jsontypes.js";
|
||||||
|
import { MarkDown } from "./markdown.js";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface NotificationOptions {
|
interface NotificationOptions {
|
||||||
@@ -631,7 +632,7 @@ class Channel{
|
|||||||
|
|
||||||
document.getElementById("channelname").textContent="#"+this.name;
|
document.getElementById("channelname").textContent="#"+this.name;
|
||||||
if (this.topic) {
|
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");
|
document.getElementById("channelTopic").removeAttribute("hidden");
|
||||||
} else document.getElementById("channelTopic").setAttribute("hidden","");
|
} else document.getElementById("channelTopic").setAttribute("hidden","");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user