Question

Related: How to store lightweight formatting (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)

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top