DEV Community

Rudy Chung
Rudy Chung

Posted on • Updated on

OSD600 Lab 2

Contributing to another project

The project I chose to contribute to was SiteGenerationTool by sfrunza13. I decided to add features to the project to be able to open .md files, and for .html files created using these files to have bold and italics Markdown indicators to be replaced with the appropriate HTML tags.

Here is my pull request.

This project was created using Python, which I was not familiar with. It took me an hour or two to get familiar with the structure of the language as well as the code before I was able to actually understand to properly change any code. After I got a hang of the language, it was fairly simple deciding to use regular expressions to search for the indicators for Markdown and replace them with the appropriate HTML tags.

After my initial changes, the repo owner asked me to improve my code. My code was missing the ability to parse multiple Markdown indicators in a single line. I had to re-think how my regular expressions were used so that they could be looped.

Through this process I learned a bit about Python and some of the features of the language, as well as how to use regular expressions in Python. Next time I contribute to a project, I would be a little more extensive in my source code to make sure all necessary elements of the feature that I am adding are present.

Receiving contributions

I received contributions to my project from sfrunza13 and devils2ndself. With two different pull requests that address a similar issue, it creates the problem of having to reconcile the differences between the two different sets of code. I did not find any glaring issues in the code that was submitted, but I asked the authors to make small changes to better match my standards. It went very smoothly and easily thanks to the features of GitHub

Top comments (0)