Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support for Markdown #3

Closed
wants to merge 4 commits into from

Conversation

tcvan0707
Copy link

Fixes Issue #2:
In pgprogram.cpp :

  • Modify if statement inside main to check .md files.

In HTMLFile.cpp :

  • Add if statement inside the for loop to create Markdown syntax feature for Heading 1
  • Using find to find the index of the mark #
  • Then using erase to delete the mark # at a certain position.
  • After all, append the <h1> tag to the string just removed #

In README.md :

  • Add additional documentation for Markdown support.

@kiennguyenchi
Copy link
Owner

Hi Thanh, I have suggested few edits before pulling the request.
1/ In pgprogram.cpp, in main function, rewrite the if-else loop to check for folder or single file. With this code, it will make the program create a folder with a single .md file, which is not good.
2/ In HTMLPage.cpp, in setHTMLBody function, we work with vector 'textFile', not variable 'file'. You should create an if-else in the for-loop. If a line is heading identifying by #, add paragraph. Else not, add paragraph to each line.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants