DEV Community

Kien Nguyen Chi
Kien Nguyen Chi

Posted on

OSD600 - Week 4 - Lab 3

In the lab this week, I'm still working on Potato-Generator project. This time, I implement 2 additional features for my program. Language input is the first feature. The program accepts --lang or -l parameter to make the default language for HTML page in the html tag/lang attribute. The second feature is the horizontal line. For Markdown file input, each time "---" appears, it will be converted to hr tag in html.

I work with 2 features in parallel. I create 2 separate branches (issue-8, issue-9) for each feature, implement each feature in each branch, then commit them. Finally, I merge these 2 branches to main branch. Then I push them to GitHub. Overall, the process is straight forward to follow and easy to understand.

-> Potato Generator Repo:
https://github.com/kiennguyenchi/potato-generator

For language feature, I implement additional function checkLanguage() to check for language input. Then I create property language type string for HTMLPage to keep track of language used.
-> Lang Issue:
https://github.com/kiennguyenchi/potato-generator/issues/8
-> Lang Commit:
https://github.com/kiennguyenchi/potato-generator/commit/519c1ae483b47095bec68f6d0fb8ea217b850a5b

For horizontal line, I simply search for "---" string in the input text vector, then replace them with hr tag.
-> Horizontal line Issue:
https://github.com/kiennguyenchi/potato-generator/issues/9
-> Horizontal line Commit:
https://github.com/kiennguyenchi/potato-generator/commit/4985b431c2e8f4ea2069c22eaef75da51ee8eccc

Top comments (0)