Modify

Opened 8 years ago

Last modified 3 years ago

#5457 new defect

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

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: high Component: TracBacksPlugin
Severity: normal Keywords:
Cc: Chris Nelson, lkraav Trac Release: 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.

Attachments (4)

AllSubsequentCommentsItalics.png (81.2 KB) - added by anonymous 8 years ago.
0001-TracBacks-Replace-newlines-and-carriage-returns-wit.patch (1.1 KB) - added by JoshuaH 7 years ago.
Proposed patch
TracBacksWithPatch.png (27.5 KB) - added by Ryan J Ollos 7 years ago.
TracBacksMultiline.png (2.2 KB) - added by dnedelchev 7 years ago.
multiline quote 0.12 stile

Download all attachments as: .zip

Change History (20)

Changed 8 years ago by anonymous

comment:1 Changed 8 years ago by Ryan J Ollos

See #5456 for a similar issue.

comment:2 Changed 8 years ago by Ryan J Ollos

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

comment:3 Changed 8 years ago by Ryan J Ollos

Appears that it may be related to issue #3232.

Changed 7 years ago by JoshuaH

Proposed patch

comment:4 Changed 7 years ago by JoshuaH

Summary: After a TracBack reference is added, all subsequent comments are in italics[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 Ryan J Ollos

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 Ryan J Ollos

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).

Changed 7 years ago by Ryan J Ollos

Attachment: TracBacksWithPatch.png added

comment:7 Changed 7 years ago by Ryan J Ollos

Owner: changed from Mel Chua to Ryan J Ollos

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 7 years ago by dnedelchev

Attachment: TracBacksMultiline.png added

multiline quote 0.12 stile

comment:8 Changed 7 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:

multiline quote 0.12 stile

comment:9 Changed 6 years ago by Ryan J Ollos

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 Ryan J Ollos

Priority: normalhigh
Status: newassigned

comment:11 Changed 6 years ago by Chris Nelson

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

comment:12 Changed 6 years ago by Ryan J Ollos

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

comment:13 Changed 5 years ago by Ryan J Ollos

Status: assignednew

comment:14 Changed 5 years ago by Chris Nelson

Cc: Chris Nelson added; anonymous removed

comment:15 Changed 3 years ago by lkraav

Cc: lkraav added

comment:16 Changed 3 years ago by anonymous

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Ryan J Ollos.

Add Comment


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

 
Note: See TracTickets for help on using tickets.