Gallery page descriptions don’t render \n as individual line breaks

Hello,

I’m finding that Gallery pages — on Sepolia at least — are not rendering individual line breaks as expected, where \n is used in the description in the metadata.

I’m finding that \n\n is rendering a new paragraph. Is it possible make \n render a line break? Or is there another method that Gallery supports to render individual line breaks?

hey there typo!

we use markdown for displaying the descriptions for our collector experiences (gallery, claims, etc.). thus, in markdown, a single \n in the description will render as a continuous line, as markdown does not count that as an individual line break.

to do an individual line break, try preceding the line break with two spaces, for example:

my first line  \n
my second line

in the example, the \n is emphasizing the whitespace (don’t actually type that). please give this a try!

Thank you — this solution appears to work on the Gallery page (screenshot right), but causes an additional unwanted space in other contexts such as OpenSea (screenshot left).

Code pasted below to verify that I have spaces as you suggested.

"description":"A 100% onchain typographic glitch study by typo.eth. \n\n\u2014 Touch to glitch.  \n\u2014 Key \u201CI\u201D to invert and reflect."

I think I’m going to go with a \n\n solution between each line, unless there’s another way. It creates more space between the second and third lines than I would ideally like, but it’s consistent between contexts at least.

"description":"A 100% onchain typographic glitch study by typo.eth.\n\n\u2014 Touch to glitch.\n\n\u2014 Key \u201CI\u201D to invert and reflect."

Related to text encoding, it would be great if these pages rendered unicode characters such as em dashes and curly quotes without needing to escape them.

Hiya, so this is unfortunately a situation where you have to pick which one matters more to you :frowning:

OpenSea’s render is sort of it’s own thing and doesn’t use classic markdown syntax, so this is something I too fight with every time I release on-chain artworks.

I find usually our markdown renderer looks better than OpenSea’s so I just share Manifold link :stuck_out_tongue:

Ex: Opensea has no padding around ----- aka <hr> from HTML. It collapses more than 2 new lines into just one or two (cant remember which). And as you’ve found out the hard way… it’s very odd with how it handles new lines vs new paragraphs. I think in fact new lines and paragraphs are the same thing on opensea which is pretty weird, i believe that’s what you’re seeing right now. :confused:

Thanks johnny — yeah, as I think you know, I prefer to share Manifold links wherever possible, but OpenSea still beats you guys on edition count, holders, history, profiles, other editions on the contract, other contracts by the creator etc. :upside_down_face:

Other miscellaneous feedback on Gallery pages:

  1. Could the description appear below the title and above the metadata, so that it’s consistent with gallery pages that do not have pieces for sale? The description is typically a more relevant thing to read before the metadata, and it feels odd that it’s inconsistent and lower down. e.g.
    Gallery item not for sale
    Gallery item for sale
  2. On narrower viewports (mobile), I’m curious whether you’ve considered having the buy now component appear higher on the page, e.g. below the title, so that users don’t have to scroll to the bottom of the page to find it.