DEV Community

Cover image for lab3 fast-forward merge and three-way recursive merge
Jason
Jason

Posted on

lab3 fast-forward merge and three-way recursive merge

This week we practiced fast-forward merge and three-way recursive merge. I pick two features to do lab3. The first feature is adding an optional -l, --lang flag which indicates the language to use. The second feature is adding support for horizontal rule in Markdown.

Create two branches

  • create two issues which are issue-9 and issue-10. The two issues correspond the two feature respectively.

Add First Feature

  1. This feature is adding an optional -l, --lang flag, which indicates the language to use when generating the lang attribute on the root element, and I edit the feature in branch issue-9.
  2. I search the information about the "argparse.ArgumentParser()" method, and add four attribute which can achieve the aim. Alt Text
  3. Add new argument - lang informat_to_html function and html_template.
  4. Fast-forward merge the first feature. issue#9, 02598ce
  5. Modify readme and add instruction about how to use -lang. Alt Text

Second Feature

  1. This feature is adding support for a horizontal rule in Markdown. The Markdown “---” should get converted to an “hr” tag. I edit the feature in branch issue-9.
  2. This feature is based on the lab2 and it bothered me because my partner's lab2 couldn't run, and the added structure was different from my original structure. I merged partner's cod in a new branch, and I rewrite the lab2 in my main branch. After that, I create a new branch issue-10 and add a new regular expression which search for "---".
  3. Three-way recursive merge the second feature. issue#10, cc8099d
  4. There is a conflict when I merge the issue-10 because I changed a regular express. I delete the origin regular express in main and replaced by issue-10's.

The problem I'm solving

At present, the main problems to be solved are how to effectively read the file line by line and how to use regular expressions correctly. So I learned tow videos, and try to modify my coding. Reading and Writing to Files, How to Match Any Pattern of Text

Top comments (0)