This week I worked on adding more functionality to cli-ssg. I decided to add support for a
--lang flag to specify language and add the ability to produce horizontal rule:
Add support for horizontal rule in markdown
Add a -l flag to generate the lang attribute
I created branches
main and chose to work on these two issues in parallel. Implementing these features went quite smoothly and I was able to get them working in their respective branches.
The code in issue-13 branch allowed the user to specify a
--lang flag to indicate the language for the
-l, --lang Lang attribute for html element [string] [default: "en-CA"]
For example: using
-l fr would result in the root element being
The code in issue-15 added support for the markdown syntax for horizontal rule. This allows the tool to render
<hr> tags if 3 or more asterisks
- or underscores
_ are present on a line by themselves.
For example: The following lines would result in a horizontal rule
*** ****** --- ___
Since the features had been implemented, I now had to merge the branches back into
I started off by merging the first branch
main. This went smoothly as
git simply performed a
It was then time to merge the second branch
issue-15. Since I had worked on these in parallel, I realized that it wouldn't be a simple
fast-forward merge. As expected, when I tried merging
git merge issue-15, there was a conflict in one of the files.
The conflict was actually quite small, and I ended up accepting both changes. After that, I added the file to the staging area and finalized the merge using
After finally merging the two branches back to
main, I tested to make sure that the newly added features were both working and it was great to see that everything worked as expected. I ended off by commenting the merge commits and closing the both the issues on GitHub.