Opened 8 years ago
Last modified 3 months ago
#15998 new defect
<pre> needs background-color
| Reported by: | Hb--- | Owned by: | team |
|---|---|---|---|
| Priority: | trivial | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | help html trac css | Cc: |
Description (last modified by )
Wiki text inside three curly brackets {{{is delivered as <code>if no line break</code> or as
<pre>when the brackets start the line.</pre>
This variant allows syntax-highlighting with Wiki Processors.
<code> is since #15910 well displayed within the limits of the Help Browser.
<pre> has twoone remaining issues:
- The formatting of the area lacks of a background-color (and a border, if possible). The area should look the same as in a normal web browser.
The result of the#!shsyntax-highlighter is wrong, i.e.the line break after comment lines gets lost andthe colour for highlighted words gets lost too.
See the screenshot with the remaining issue in comment 10, especially the orange coloured marks for missing line breaks:
Attachments (2)
Change History (12)
by , 8 years ago
| Attachment: | help-pre-format-line-break.png added |
|---|
comment:1 by , 8 years ago
| Description: | modified (diff) |
|---|---|
| Milestone: | → 18.02 |
comment:3 by , 8 years ago
Replying to Hb---:
- the line break after comment lines gets lost and
I think Java behaviour is correct here. The line break is not inside the <pre> but inside a nested <span>. It might be a Trac bug.
comment:4 by , 8 years ago
TracSyntaxColoring deliveres CSS like <span ...>code line <0A linefeed here></span> . Probably the Java HTML Viewer cannot display a span as block element. But all other browsers can do this.
Probably even Pygments is to blame.
comment:5 by , 8 years ago
Created bugeport: https://trac.edgewall.org/ticket/12984 Let's see what they say. Fun thing: the HTML code is correct in the bug report
comment:7 by , 8 years ago
| Keywords: | html added |
|---|---|
| Milestone: | 18.02 → 18.03 |
follow-up: 9 comment:8 by , 8 years ago
I believe that is Java HTML viewer's issue. How about adding the following for workaround (untested)?
div.code pre span { white-space: pre }
comment:9 by , 8 years ago
| Keywords: | trac css added |
|---|---|
| Milestone: | 18.03 |
Replying to Jun Omae <jun66j5@…>:
How about adding the following for workaround (untested)?
div.code pre span { white-space: pre }
It doesn't work. Swing CSS capabilities are very limited. Let's see if the next Trac update solves our problem.
by , 3 months ago
| Attachment: | 20250806 bug 15998.png added |
|---|
comment:10 by , 3 months ago
| Description: | modified (diff) |
|---|---|
| Priority: | minor → trivial |
| Summary: | <pre> needs background-color and the syntax-highlighter checked → <pre> needs background-color |





Replying to Hb---:
This point will be impossible to fix. Swing does not provide colour syntaxing highlight for programming languagesIt should possible by CSS :)