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 new feature markdown to HTML #19

Merged
merged 5 commits into from
Sep 24, 2021
Merged

Conversation

mkim219
Copy link
Contributor

@mkim219 mkim219 commented Sep 23, 2021

This pull request fixes #18

Change

markDownToHTML function

  • created new function called "markDownToHTML"
  • takes one string arguments and return string.
  • includes set of regex for replacing markdown syntax to HTML tag
  • the input string goes through the regex and replace into HTML tag if string contains corresponding markdown syntax
  • function returns trimmed string

createHTML function

  • already existing function
  • need to validate the extension of the file by using if-else statement
  • if the input file is md file, using "makrDownToHTML" to convert from markdown string to HTML string and store dataTemplate variable
  • variable dataTemplate places in inside of body tag

cli function

  • has validation for accepting only text file
  • add md extension file in else if statement

README.md

  • describe new feature

@suhhee1011
Copy link
Owner

Hi! Minsu, I have reviewed your PR. And I found a few things that if you fixed them, it will be better.

  • Please add a feature to convert both text and MD files in one folder to HTML.
  • Please fix that if I put Read.md in the folder with text files, it shows an error message "This README.txt file is not exist. Please check file name"

@mkim219
Copy link
Contributor Author

mkim219 commented Sep 24, 2021

I have fixed those issue. Please review and confirm.

@suhhee1011
Copy link
Owner

suhhee1011 commented Sep 24, 2021

Thank you it looks good to me!

@suhhee1011 suhhee1011 merged commit 1dec57b into suhhee1011:master Sep 24, 2021
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.

Add new feature markdown to HTML
2 participants