How to store lightweight formatting (Textile, Markdown) in database?

前端 未结 4 506
故里飘歌
故里飘歌 2021-02-01 21:28

I\'m going to be implementing a lightweight formatting language (probably Textile, maybe Markdown) in a project I\'m working on, and I\'m wonder how best to store it in the data

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-01 21:37

    Store markdown:

    • Every view = conversion
    • Every edit = no processing

    Store html

    • Every view = no processing
    • Every edit = convert to markdown and back

    Store both

    • Every view = no processing
    • Every edit = convert to html after edit

    You have to weigh up your processing costs vs. your storage cost.

提交回复
热议问题