How to fold the code

Asked by Si Wang

Hi,

I want to ask about a Launchpad function:
When I ask a bug question in the community, the code is very long, like the LHE file.
After describing my problem, if I just paste the total file content into the question, it would be very long.

That's what I encounter in many questions askings, there is too long code content not very useful to look at it.

So I want to ask, do we have a function like, when we ask questions or answer questions, there is a choice can fold the complete
code? When people want to look at the whole code, they can unfold the code content.

I didn't find any similar function on the website.

Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Si Wang
Solved:
Last query:
Last reply:
Revision history for this message
Ioana Lasc (ilasc) said :
#1

Can you please tell us exactly on which pages of Launchpad you're asking about ?

Revision history for this message
Si Wang (siw34) said :
#2

I quickly found one.
For example, this question:
https://answers.launchpad.net/mg5amcnlo/+question/702756
Even though the person did not describe his/her problem in his/her own words, just attached the file content.
It has too long coding file material. It may be better able to fold the detailed content from an output coding file.

Thank you.

Revision history for this message
Si Wang (siw34) said :
#3
Revision history for this message
Ioana Lasc (ilasc) said :
#5

I see what you mean, we do not have that option.

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Maybe a specific Launchpad feature can be used for the purpose that you are looking for.

The Launchpad answers system allows replying by e-mail and tries to hide the original e-mail text.

If lines begin with a greater sign, then they can be displayed and hidden.

> Let't try it:
> These lines should build a block that can be expanded and can be hidden
>
> If hidden, then there is just a small icon with square brackets and three dots.

In any case you can upload long files to other web pages (e.g. https://pastebin.ubuntu.com/ Ubuntu pastebin) and just put the link into your question, but you have to be aware that your text may be removed from that external page earlier than expected.

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#7

No, sorry, this apparently did not work.

Maybe it is indeed only working for incoming e-mails.

Revision history for this message
Si Wang (siw34) said (last edit ):
#8

Thanks, that solved my problem.
I believe in the past I saw someone use maybe the same greater sign works, it can fold.
But recently I returned to read but found out the previously folded content is unfolded now.
Hope in the future we could have fold detailed content function.