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

Markdown in ReadmePreview not parsed correctly #48

Closed
shacharRonZohar opened this issue May 10, 2023 · 5 comments
Closed

Markdown in ReadmePreview not parsed correctly #48

shacharRonZohar opened this issue May 10, 2023 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@shacharRonZohar
Copy link
Contributor

Since the markdown is taken as a string and parsed as regular html, it misses some important parts from GitHub readme markdown presentation.

Consider this title part of a readme preview, that currently looks like this:

wrong-markdown

While the actual readme looks like this:
correct-markdown

I prototyped a solution using marked, which allows us to parse and render the correct HTML quickly and without implementing our own parser, and would love to submit a PR if there is interest in using this particular library, or any other.

@eylonxx
Copy link
Contributor

eylonxx commented May 11, 2023

Will this also fix #23 ?

@yonatanmgr
Copy link
Owner

Sounds good! Could you submit a PR which uses marked instead of showdown and we'll see if it works better? @shacharRonZohar

@shacharRonZohar
Copy link
Contributor Author

shacharRonZohar commented May 11, 2023

Will this also fix #23 ?

@eylonxx possibly, although I suspect we will need to add a further emoji parsing layer, since I doubt that marked or any library will keep a collection of all possible emojis themselves.

Sounds good! Could you submit a PR which uses marked instead of showdown and we'll see if it works better?

@yonatanmgr for sure! I'll work on it today and see if it solves it

@shacharRonZohar
Copy link
Contributor Author

shacharRonZohar commented May 11, 2023

Looks like it worked well, filed a simple PR #49 with the changes.

It looks like Emoji parsing (for #23) will need further enhancements, but we can probably use marked for that with some plugin.

@yonatanmgr yonatanmgr added bug Something isn't working enhancement New feature or request labels May 11, 2023
@yonatanmgr
Copy link
Owner

Resloved in #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants