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

Gomark handles line breaks differently than traditional markdown renderers. #14

Open
chriscurrycc opened this issue Jan 21, 2025 · 3 comments

Comments

@chriscurrycc
Copy link

Memos displays correctly; however, when I use other rendering plugins after retrieving data via the open API, discrepancies arise. Here are some examples:

  1. Handling of line breaks:
    If there are two line breaks, Memos renders a blank line, while most other renderers ignore this blank line. For example:
test

test

Rendering results.
test

test

Gomark rendering results
The GitHub markdown renderer ignores empty lines, so they won't display, but there will be an extra line in memos as follow screenshot.
Image

  1. blockquote
    In the following example, there is only one blockquote, while gomark also renders a separate paragraph.
> test
test

Rendering results.

test
test

Gomark rendering results

test

test

@johnnyjoygh
Copy link
Contributor

Memos primarily focuses on plain text content, aiming for a WYSIWYG(what you see is what you get) experience, while also supporting some commonly used Markdown syntax. There are some differences between memos and markdown, such as all blank lines being rendered in memos, also including the example you provided. Personally, I think the result of memos rendering is better.

@chriscurrycc
Copy link
Author

I think you're right; using Memos alone isn’t an issue. However, if I want to use the open API to display recent Memos on other platforms, like my blog, I've found that Memos' content text is incompatible with some popular markdown parsers.

@johnnyjoygh
Copy link
Contributor

@chriscurrycc You can retrieve nodes through the API. If you want the same rendering effect as memos, then refer to the memos renderer.

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

No branches or pull requests

2 participants