Should I convert stored Markdown to HTML, or should I just store HTML?

后端 未结 4 1792
闹比i
闹比i 2021-02-02 16:13

Markdown seems to be easier to write and edit than HTML. All HTML editors I\'ve seen output a ton of unnecessary junk. Markdown seems cleaner.

Here is what I\'m thinking

4条回答
  •  长发绾君心
    2021-02-02 16:49

    As a practical example, Stack Overflow supports Markdown (as you know), but stores both the Markdown and the rendered HTML in the database. This makes it much faster to serve pages, because the rendered HTML is always the same. Posts are created much less frequently than they are shown to users.

提交回复
热议问题