开发者

What markup language to store in a DB?

Related: How to store lightweight form开发者_高级运维atting (Textile, Markdown) in database?

I want to store comment formatting in some markup language in our DB. However, we want to allow multiple formatting languages (markdown, textile, restructuredText). It seems we should store a superset of their features, so that we can convert between them.

  • Will this work?
  • Is there such a superset?
  • Are there libraries to switch between them?
  • Is there a more structured format we should keep comments in, in the DB?

(Python/Google App Engine if it matters)


Have you considered something simpler: storing the comments in their original form, together with an extra column saying which format it is stored in (markdown, textile, etc...)?

I would think that any superset is either going to result in some loss of information by storing only one of the many possible different ways the syntax can be written in a specific markup or else it will be too complicated as it tries to allow for all the possible encodings of a specific syntax in all the allowable markups.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜