Jump to content
ICDeadPpl

REQ: Code collapse feature

5 posts in this topic Last Reply

Recommended Posts

It would be nice to have sections marked as 'code' to be collapsed.
As it is quite common to paste scripts and logs in posts, these can be quite annoying to scroll past.

Share this post


Link to post

You can do that already, but it's not a button, you have to put the tag in yourself manually.


Sample syslog piece grabbed from a random post

Mar 29 18:13:56 Tower kernel: pcieport 0000:00:03.2: broadcast error_detected message
Mar 29 18:13:56 Tower kernel: pcieport 0000:00:03.2: broadcast mmio_enabled message
Mar 29 18:13:56 Tower kernel: pcieport 0000:00:03.2: broadcast resume message
Mar 29 18:13:56 Tower kernel: pcieport 0000:00:03.2: AER: Device recovery successful
Mar 29 18:13:57 Tower kernel: iommu ivhd0: AMD-Vi: Event logged [
Mar 29 18:13:57 Tower kernel: iommu ivhd0: IOTLB_INV_TIMEOUT device=0e:00.0 address=0x000000081e44b450]
Mar 29 18:13:57 Tower kernel: pcieport 0000:00:03.2: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
Mar 29 18:13:57 Tower kernel: pcieport 0000:00:03.2: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Receiver ID)
Mar 29 18:13:57 Tower kernel: pcieport 0000:00:03.2: device [1022:1453] error status/mask=00200000/04400000

Like that.

Share this post


Link to post

@SpencerJ, any chance of possibly modifying the code tag to embed the spoiler tag simultaneously? That way when we tell people to post using the code button they are monospaced and collapsed, making the forum much cleaner to read through.

 

Share this post


Link to post

To build on this, allow setting a title for the code tag spoilers; for example:
[ code = "/etc/ssh/sshd_config" ]...[ /code ] could change the header of the spoiler to the name of the file or command of which the code block contents come from?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.