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

Fixes #18 #25

Merged
merged 2 commits into from Sep 22, 2021
Merged

Fixes #18 #25

merged 2 commits into from Sep 22, 2021

Conversation

oliver-pham
Copy link
Contributor

@oliver-pham oliver-pham commented Sep 22, 2021

What changes I've made

I've added support for parsing Markdown to your SSG. Right now, it can only parse Markdown headings, italics, and bold text.

Why I made these changes

This pull request should resolve #18.

How I implemented it

I made use of regular expressions to capture Markdown syntax and its content. The content, which is extracted with capturing groups, can then be passed to corresponding HTML templates. See markdown object in /lib/parser/markdown.js. Other changes I've added:

  • Documentation for supported file type and features
  • A method to check if a file type is supported, isFileSupported
  • A method to process Markdown content, treatMarkdownData
  • A method to render content in HTML based on the file type, renderContent
  • Refactored unnecessary code

@ycechungAI
Copy link
Owner

ya overall looks good, I probably need to test it after i merge.
Cause you are running mac and im running windows/linux
Thanks

@ycechungAI ycechungAI merged commit bcde887 into ycechungAI:main Sep 22, 2021
Copy link
Owner

@ycechungAI ycechungAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have reviewed the changes

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.

Added support for Markdown
2 participants