Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6627 closed enhancement (wontfix)

Option to limit width of box

Reported by: rjollos Owned by: nuald
Priority: normal Component: CodeExampleMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

The code example boxes currently span the width of the page (except in certain cases, as noted in #6626). It would be a nice feature to have a directive for limiting the width of the box to a specified number of columns, as the EmailProcessorMacro does.

The EmailProcessorMacro uses notation cols: 40. I think a better notation would be #!columns:40 and allow cols to be a synonym.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by rjollos

One specific use case for this would be to limit the number of columns to 80, as in a shell editor.

comment:2 Changed 5 years ago by nuald

  • Resolution set to wontfix
  • Status changed from new to closed

The ticket can't be implemented:

  • I can't use EmailProcessorMacro functionality, because it rewraps text using newlines. It's unacceptable due it will broke SELECT ALL feature (a user will select code and can't use it in original form because it will contain odd newline characters);
  • I can't use "width" attribute for the "<pre>" tag, because it's deprecated (and I don't want to break HTML validity) and it is not working properly for "pygmentized" sources.

If you have some other options, let me know. For now I suggest just to write sources with the limited number of columns (80 is a good practice :) ).

comment:3 Changed 5 years ago by rjollos

I think what I originally had in mind was to fix the width of the code box (the email processor was a bad example for this), and have a scroll bar if the code overflows.

If you shrink the width of the page, the scroll bar does appear, so that is good. Now that I think about it more, there is really no point to limiting the width of the code box, now that you have fixed #6626, so I think wontfix is a good choice.

Add Comment

Modify Ticket

Action
as closed The owner will remain nuald.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.