For the next update to my release 0.1 I first wanted to update my SSG based on the feedback I got from the release 0.1 assignment. I first decided to clean up my git repository and remove all the fluff inside of it that didn't need to be their i.e pychache files, output files, and test files. next I cleaned up my HTML by not making a paragraph tag every newline in the text file I would instead group them together until there was an empty line which i would make a new paragraph. After my fixes i needed to add two new features i decided to add HTML lang support and add code support in markdown where code ill write inside the blocks of ` will be formatted like code.
Adding Language
To do this i needed to add a new command line argument this required me to modify the start of my program where it reads commands. Then i needed to modify the file that writes the HTML by changing how the HTML tag is written by adding the lang tag then i added a default value for the parameter that is en-CA for English Canadian in case the user doesn't specify a language.
Adding Code to Markdown
To do this i needed to figure out how to use python to get a substring of a string so i can separate the part of the string with the ` character. With this logic i was able to add the indentation feature from the previous lab as the logic between them is essentially the same which would allow me to now select a block a text and put a tag between them such as highlighting, underlining, bold etc.
Top comments (0)