New Features
This week's task in my open source course was to add a couple of new features to my text to HTML converter. The goal of this task was to gain experience with creating parallel branches when working on new features, to learn about fast-forward and three-way-recursive merges and to handle merge conflicts.
Language Support Feature
This feature was added to allow the user to specify the language they would like to use when converting their files to HTML. To use this feature the user can simply run the program with -l or --lang <language-code> <file-path> and the converted HTML file will include the language in the root <html> element. I created a new branch to work on implementing the changes needed for this functionality.
Horizontal Rule Feature
This feature was added to support horizontal rule conversion from markdown to HTML. Again, I created a new branch to work on coding this new functionality parallel to the previous feature. When converting a markdown file to HTML, if the markdown file has horizontal rule indicators like: *** or --- or ___, they will be converted to an hr tag in the HTML.
Merging Process
After I finished coding both functionalities and committing the changes to their respective branches I merged my horizontal rule branch to my main, which was a fast-forward merge and after that I merged my language support branch. During the second merge there were some conflicts, but I simply fixed them and made sure that everything was working before completing the merge. The commit for language support can be found here and the commit for horizontal rule support can be found here
The Problems
I didn't come across any issues completing this task. The only thing that worried me a bit were the merge conflicts, but they were easily fixed and I tested everything to make sure that they didn't break anything.
What I learned
It was cool to learn that a commit code can be used in the comments when closing an issue and the issue will be linked to the commit which closed it.
Top comments (0)