What markup language to store in the database?

Related: How to store easy formatting (Textiles, Markdown) in a database?

I want to keep the formatting of comments in some markup languages ​​in our database. However, we want to allow several formatting languages ​​(markdown, textiles, restructured text). It seems we should keep a superset of our capabilities so that we can convert between them.

  • Will this work?
  • Is there such a superset?
  • Are there any libraries for switching between them?
  • Is there a more structured format that we need to store in the database?

(Python / Google App Engine, if that matters)

+3
source share
1 answer

Have you considered something simpler: saving the comments in the original form along with an additional column that indicates in which format it is stored (marking, textiles, etc.)?

I would think that any supernet would either lead to some loss of information, preserving only one of the many possible ways that the syntax can be written in a specific markup, otherwise it will be too complicated, because it tries to allow for all possible encodings of a certain syntax in all valid markups.

+9
source

Source: https://habr.com/ru/post/1726670/


All Articles