DEV Community

Cover image for Working On My First Pull Request
TD
TD

Posted on

Working On My First Pull Request

Last week I was presented with the opportunity to contribute to Izyum, a static site generator tool that creates an HTML file for each .txt file provided. Since the application had no existing support for processing markdown files, I began by filing an issue for it.

Overview of the Issue

Since Izyum lacked the feature of processing markdown files, my Issue was about implementing initial support for h1, h2, and bold text. I clearly outlined all the features I had in mind in the Issue.

Writing the Code

After filing the Issue, the next step was to write the code and make sure it passed all tests. I was able to implement h1 and h2 in the first phase in a new branch named issue-9, as I will still trying to figure out how to add support for bold text. Later, after doing some research and through the process of trial and error, I was able to implement support for bold text.

Challenges Encountered

Some of the challenges I faced while working on the code were:

  • Finding a way to ignore H1 and H2 from being bolded as headings are in bold by default
  • Coming up with descriptive variable names

Creating Pull Request

I created a PR when I was able to Izyum support H1 and H2 text. Tymur was able to provide me with constructive feedback on how to improve the code. I made revisions to the code to match the feedback and pushed another commit to issue-9. In a final commit, I was able to implement support for bold text and update the README.md file with instructions on proper usage of Markdown syntax accepted by the SSG. Later, the commit was merged with the main branch.

Final Outcome

  • Izyum is now able to support markdown files
  • Users can add # at the beginning of the line to mark it as Heading 1, and the content of the line will be added between the opening and closing h1 tag.
  • Users can add ## at the beginning of the line to mark it as Heading 2, and the content of the line will be added between the opening and closing h2 tag.
  • Users can add text between a pair of ** to mark it as bold, and the text will be added between the opening and closing strong tag.

To learn more about how to use Izyum with its brand new markdown support, click here.

Top comments (0)