Markdown is a text-to-html conversion tool that allows you to write an easy-to-read, easy-to-write plain text format, then convert it to structurally valid HTML.
Integration of markdown into Bugzilla will provide support for formatting within comments, while still supporting plain-text content.
The bulk of this project involves development in Perl and regular expressions.
Bugzilla requires the following customisations to a Markdown engine:
- continue to support the existing Bugzilla markup:
- links to bugs, comments, attachments
- linkification of URLs
- linkification rules defined by Bugzilla extensions
- remove support for raw HTML
- remove support for inline images
- add support for the following Github Flavoured Markdown features:
- multiple underscores in words
- fenced code blocks
Overview of the required changes
- add a User Preference which controls Markdown generation and rendering
- when Markdown is enabled, add a checkbox to the "new comment" UI which allows per-comment disabling
- update the schema for the comments table to support per-comment rendering
- create a template filter for comments which honours the current user and comment settings, calling a Markdown library if required
- use the template filter in all places comments are rendered as HTML (web UI and email)
- update the comment template to add the Markdown checkbox, and ensure the template is used in all relevant locations
- create a Bugzilla specific Markdown processor rough POC
- create an "editing help" for users which explains all the supported and unsupported Markdown rules