Ask coding questions

← Back to all posts
Markdown in HTML
isaiah08

Is there a HTML tag that processes markdown? I know that there is a way to do it with JS, but can you do it just with HTML?

doesn't work.

Answered by Baconman321 [earned 5 cycles]
View Answer
Voters
isaiah08
Comments
hotnewtop
Baconman321

No, but you can make a parser quite easily. Just use JavaScript to go over each character of the text and find the commands for markdown.

For code, you can use a syntax highlighter.

isaiah08

Thanks for the quick response! @Baconman321

Baconman321
xxpertHacker

@Baconman321 Since when is creating a markdown parser from scratch that fully conforms to the MD specification quite easy.

Btw, the parser I've used was this one; very easy setup.

(Example of use in real Repl: https://repl.it/@EpicGamer007/HackTalk#modules/md.mjs)

xxpertHacker

Well... you can target the DOM:

SixBeeps

No, because HTML is itself a markdown language (hence the name HyperText Markdownup Language)

isaiah08

Thanks for the quick response! @SixBeeps

Baconman321

@SixBeeps LOL imagine confusing markdown with markup

SixBeeps
Baconman321

@SixBeeps U gonna pay to keep quiet?

Jk, Jk