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

Multi-paragraph long descriptions (or could be: Long description formatting) #322

Closed
jasonliu-- opened this issue Nov 20, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@jasonliu--
Copy link

In the long_description of Portfiles, it's possible to create long descriptions with multiple paragraphs by using two newlines, i.e. \n\n. Would it be possible to also display them on the website as separate paragraphs?

Also, some long_descriptions may include bulleted lists, typically using * as the bullet point character. This happens to also be the typical character used by many markup formatting systems (e.g. Markdown, Wikiformatting, etc.) to signal a bulleted list, which gets displayed as actual bullet point "dots". It might be overkill to include a full-blown Markdown parser, but maybe it would be possible to manually include a small subset to automatically convert to "pretty-printed" HTML? I'm thinking maybe just converting * into a <ul>, and converting words/phrases surrounded by backticks into monospaced <tt>, <var>, <code>, or <samp> (even that might be too much of a hassle, since you would need to parse pairs of backticks for it to work).

Discussing the bulleted lists brings me back to the newlines in long_descriptions. A single \n is interpreted as a line break in port info, so maybe that should get displayed as a <br> in the website. At a minimum, converting single newlines to <br> and double newlines to separate paragraphs would allow the long descriptions of ports such as keystroke-explorer, micronaut, mongo-tools, etc. to be displayed properly on the website.

@mascguy mascguy added the enhancement New feature or request label Nov 20, 2021
@jasonliu--
Copy link
Author

I just noticed Issue #133, so I supposed this Issue would be counted as a duplicate. My post proposes possible solutions though, so it might still be useful to whoever decides to tackle the issue.

@ryandesign
Copy link
Contributor

Changing newlines into the HTML equivalent is obviously required and is #133. Changing asterisks at the beginning of lines into a bulleted list is reasonable. But I wouldn't try to do more than that. The port description has always been intended to be text, not markup.

Using backticks in descriptions has never been recommended or suggested, as far as I know, and is uncommon. I only count 14 portfiles doing this. I suggest they stop doing that.

@ryandesign ryandesign closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants