Modify

Opened 6 years ago

Last modified 6 years ago

#15998 new defect

<pre> needs background-color and the syntax-highlighter checked

Reported by: Hb--- Owned by: team
Priority: minor Milestone:
Component: Core Version:
Keywords: help html trac css Cc:

Description (last modified by Don-vip)

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 two issues:

  1. 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.
  2. The result of the #!sh syntax-highlighter is wrong, i.e.
    • the line break after comment lines gets lost and
    • the colour for highlighted words gets lost too.

See the screenshot, especcially the orange coloured marks for missing line breaks:


Attachments (1)

help-pre-format-line-break.png (106.7 KB ) - added by Hb--- 6 years ago.

Download all attachments as: .zip

Change History (10)

by Hb---, 6 years ago

comment:1 by Don-vip, 6 years ago

Description: modified (diff)
Milestone: 18.02

in reply to:  description comment:2 by Don-vip, 6 years ago

Replying to Hb---:

  • the colour for highlighted words gets lost too.

This point will be impossible to fix. Swing does not provide colour syntaxing highlight for programming languages

It should possible by CSS :)

Last edited 6 years ago by Don-vip (previous) (diff)

in reply to:  description comment:3 by Don-vip, 6 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 Hb---, 6 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 Don-vip, 6 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:6 by Don-vip, 6 years ago

In 13459/josm:

see #15998 - improve rendering of code snippets in help browser

comment:7 by Don-vip, 6 years ago

Keywords: html added
Milestone: 18.0218.03

comment:8 by Jun Omae <jun66j5@…>, 6 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 }

in reply to:  8 comment:9 by Don-vip, 6 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to Hb---.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.