Opened 7 years ago

[PATCH] After a TracBack reference is added, all subsequent comments are in italics

Reported by: Owned by: rjollos rjollos high TracBacksPlugin normal ChrisNelson, lkraav 0.11

Description

After a TracBack reference is added to a tickets comment list, all subsequent comments are in Italics. Seems like there is probably a problem with the wiki markup that is generated an inserted for the TracBack reference, such as an unterminated pair single quotes.

See attached screen capture.

comment:1 Changed 7 years ago by rjollos

See #5456 for a similar issue.

comment:2 Changed 7 years ago by rjollos

This could be caused by or related to a problem with the wiki engine. See Trac Issue #4235 on Edgewall.

comment:3 Changed 7 years ago by rjollos

Appears that it may be related to issue #3232.

Proposed patch

comment:4 Changed 7 years ago by JoshuaH

• Summary changed from After a TracBack reference is added, all subsequent comments are in italics to [PATCH] After a TracBack reference is added, all subsequent comments are in italics

I've attached a patch which appears to fix the problem. Note that it also changes the formatting by replacing newlines with spaces instead of simply removing them.

The plugin strips newlines and adds italics (using '') around the quoted text for a trackback, but failed to strip carriage returns, which were (the theory goes) being interpreted by Trac's Wiki engine as newlines for formatting purposes.

This is probably in part due to Trac not closing formatting properly for list items which was linked above, but this patch should at least produce formatting that doesn't trigger that bug.

comment:5 Changed 7 years ago by rjollos

Thanks for the patch, I will try it out. The underlying issue may be the same as t:#2064.

comment:6 Changed 7 years ago by rjollos

I've tested the patch and it seems to be an improvement. I will apply the patch to the repository once I have adopted the plugin (see #6597).

However, in the long term it seems more appropriate that the tracbacks are not added in italics at all (see #6637 for more details).

comment:7 Changed 7 years ago by rjollos

• Owner changed from mchua to rjollos

Here is the test message I used:

Testing a multi-line reference to ticket #2.

Here is some more text. Wiki markup. [1].

Here is some more text. Wiki markup. [2].


Here is what I see AFTER and BEFORE application of the patch:

Changed 6 years ago by dnedelchev

multiline quote 0.12 stile

comment:8 Changed 6 years ago by dnedelchev

I tried it (with Trac 0.12) and got the following in the ticket #2 comment:

{{{
#!html
<div class="tracback"></div>
}}}
This ticket has been referenced in ticket #1:
> ''Testing a multi-line reference to ticket #2.

Here is some more text. Wiki markup. [1].

Here is some more text. Wiki m...''


It is rendered exactly like in the second example in he previous comment (the one starting with Changed 9 seconds ago by anonymous). The result looks as if (for the rendering engine) there are two orphaned double apostrophes ('') instead of a pair of opening and closing...

What do you think about not removing new lines and just adding a quote sign at the beginning of each quoted line:

{{{
#!html
<div class="tracback"></div>
}}}
This ticket has been referenced in ticket #1:
>''Testing a multi-line reference to ticket #2.
>
>Here is some more text. Wiki markup. [1].
>
>Here is some more text. Wiki m...''


that is rendered with Trac 0.10 (running now at trac-hacks.org) in the way it's shown in the first example in he previous comment (the one starting with Changed 93 seconds ago by anonymous).

and with Trac 0.12 in tis way:

comment:9 Changed 6 years ago by rjollos

I'm not using the plugin at this time, but will gladly apply any patches you send along.

comment:10 Changed 6 years ago by rjollos

• Priority changed from normal to high
• Status changed from new to assigned

comment:11 Changed 6 years ago by ChrisNelson

Wow, that last comment is a mess after "Trac 0.12 in tis way".

comment:12 Changed 6 years ago by rjollos

Yeah, that was odd. Seems to be better after changing [[Image(TracBacksMultiline.png,left)]] -> [[Image(TracBacksMultiline.png)]].

comment:13 Changed 5 years ago by rjollos

• Status changed from assigned to new

comment:14 Changed 5 years ago by ChrisNelson

• Cc ChrisNelson added; anonymous removed

comment:16 Changed 23 months ago by anonymous

This issue does not happen anymore with Trac 1.0.1 (I have not tested any older version)

Modify Ticket

Action
as new The owner will remain rjollos.
Author

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

Note: See TracTickets for help on using tickets.