Skip to content

Create parsers to convert Markdown to HTML #17

@scattenlaeufer

Description

@scattenlaeufer

Is your feature request related to a problem? Please describe.
We want the user to be able to create resolutions in either markdown or reStructuredText, but on for the website we need all text in HTML. So we need a parser to convert the user generated input to HTML.

Describe the solution you'd like
I propose to use docutils since it can parse both Markdown and reStructuredText. The output from markdown is a bit nicer out of the box, but since it can't parse rST and the output from both inputs should be the same, docutils seems to be the better solution.
Parsing will be done through celery when requesting the HTML version by the view and the result will be cached for future requests. The obvious problem with this approach is the added time, some page requests will get due to the added work load to be done while collecting the view context.

Describe alternatives you've considered
It would also be possible to parse the text once on creation/modification and store the HTML text in the database, but that isn't the best idea, since it would mean to have the same text in two versions stored in database and might lead ugly problems with mismatched text versions in the future.

Metadata

Metadata

Labels

enhancementNew feature or requestrfcA request for comments

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions