I implemented at least three important things this week:
- First, I removed support for inline images from Markdown engine. The standard Markdown supports image inclusion but Bugzilla community does not want to have it.
- Second, I added a Github Flavored Markdown feature called ‘Multiple underscores in words‘.
- Last but not least, I also defined a new filter for templates to render comments based upon the inclusion/exclusion of Markdown structures.
This week, I was quite busy with my university stuff and couldn’t spend that amount of time that I did in previous weeks. Nevertheless, I made a new class called Markdown which will serve the main functionality of Markdown generation. This class is a sub-class of Text::Markdown. I also added Text::Markdown to the list of optional modules for Bugzilla functionality.
Furthermore, I studied most of the source code of Text::Markdown to try to understand how things are processed and what possible changes to it would be required in order to work well for Bugzilla.
After implementing features to allow administrators and users to choose to use markdown, we need to start writing a concrete markdown processor. To do that, we have decided to make use of Text::Markdown CPAN module. But, we cannot make use of all of its functionality. We also need to make some modifications and additions to it.
This week, I spent my time to try to subclass it and look for possible conflicts that it might have with Bugzilla. I integrated this module with my Bugzilla installation and examined the generated output. Next, I need to override some methods of the module to make it behave the way we want to.
After implementing a new user preference in first week, we need to provide users with a new option to let them choose if they want to use the Markdown feature for each comment. Having said that, we need to add a new column to comments table to specify whether a particular comment should be rendered with Markdown engine or not. Also, a new check-box should appear on UI when a user wants to submit a new comment if the Markdown feature is enabled at all. Depending on the default value of the preference, the check-box will be selected or not.
So, in summary, I manipulated the current schema of comments table, added a new UI feature and handled user input accordingly.
You can see the commit here.
So, it was the first week of my work. Before the start of coding period, I had a short conversation with my mentor to decide how things should start and go. We decided to start with an addition to Bugzilla that lets users choose if they want to make use of Markdown feature by default or not. The feature also makes it possible for an administrator to disable the Markdown feature altogether so that no user is able to use it at all. I did that simply by adding a new user preference to the list of current preferences. Below you can see a screenshot of it.
Bug 1014164: Add a new user preference for using markdown
Hi everyone. I just created this blog for the sake of Google Summer of Code 2014 program. I will be using this blog to post reports about the status of my work as Mozilla requires me to.