feat: Also check for `md ` to start markdown

This commit is contained in:
Kainoa Kanter 2022-03-23 12:42:29 -07:00 committed by GitHub
parent 4e25416f80
commit 525a254531
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ function viewPaste(content: string, views: string) {
for (let i = 1; i <= content.split("\n").length; i++) {
lineNumbers.innerHTML = lineNumbers.innerHTML + `${i}<br>`
}
if (content.startsWith("---")) {
if (content.startsWith("---") or content.startsWith("md ")) {
codeView.innerHTML = marked.parse(content.substring(3))
hide(lineNumbers)
} else {