#6627 closed enhancement (wontfix)
Option to limit width of box
Reported by: | Ryan J Ollos | Owned by: | Alexander Slesarev |
---|---|---|---|
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 15 years ago by
comment:2 Changed 15 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → 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 15 years ago by
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.
One specific use case for this would be to limit the number of columns to 80, as in a shell editor.