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

Line breaks on the napari hub different to github #418

Open
neuromusic opened this issue Jan 27, 2022 Discussed in #378 · 3 comments
Open

Line breaks on the napari hub different to github #418

neuromusic opened this issue Jan 27, 2022 Discussed in #378 · 3 comments
Labels
bug Something isn't working frontend good first issue P2 Medium Priority

Comments

@neuromusic
Copy link
Collaborator

Discussed in #378

Originally posted by haesleinhuepf January 4, 2022
Hi all,

I just noticed that napari hub plugin pages deal with line breaks (between badges) differently compared to github. The layout does not look good on the hub:

https://www.napari-hub.org/plugins/napari-skimage-regionprops

image

https://github.com/haesleinhuepf/napari-skimage-regionprops

image

Also line breaks within markdown text shows on the hub like this:

image

and on github like that:

image

Is this something we plugin developers should deal with or can this be fixed on hub side?

Thanks!

Best,
Robert

@neuromusic neuromusic added the bug Something isn't working label Jan 27, 2022
@neuromusic
Copy link
Collaborator Author

This is a bug b/c the markdown spec indicates that line breaks in the source should not translate into line breaks in the HTML:

A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line — a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

The implication of the “one or more consecutive lines of text” rule is that Markdown supports “hard-wrapped” text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type’s “Convert Line Breaks” option) which translate every line break character in a paragraph into a
tag.

https://daringfireball.net/projects/markdown/syntax#p

@neuromusic
Copy link
Collaborator Author

after a dive with @liaprins-czi @kne42 & @codemonkey800, there's something else going on here... there are other plugins that use line breaks that aren't having this problem.

need to investigate the README more closely... maybe there are trailing white space? or carriage returns?

@neuromusic
Copy link
Collaborator Author

however if we want to be consistent with github, may need to investigate further how to support READMEs like this

@neuromusic neuromusic added P2 Medium Priority and removed P0 Critical Priority labels Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend good first issue P2 Medium Priority
Projects
Status: Icebox
Development

No branches or pull requests

2 participants