Opened 4 years ago
Last modified 17 months ago
#5457 new defect
[PATCH] After a TracBack reference is added, all subsequent comments are in italics
| Reported by: | rjollos | Owned by: | rjollos |
|---|---|---|---|
| Priority: | high | Component: | TracBacksPlugin |
| Severity: | normal | Keywords: | |
| Cc: | ChrisNelson | 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)
Change History (18)
Changed 4 years ago by anonymous
comment:1 Changed 4 years ago by rjollos
comment:2 Changed 4 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 4 years ago by rjollos
Appears that it may be related to issue #3232.
comment:4 Changed 3 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 3 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 3 years ago by rjollos
Changed 3 years ago by rjollos
comment:7 Changed 3 years ago by rjollos
- Owner changed from mchua to rjollos
comment:8 Changed 3 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 3 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 3 years ago by rjollos
- Priority changed from normal to high
- Status changed from new to assigned
comment:11 Changed 3 years ago by ChrisNelson
Wow, that last comment is a mess after "Trac 0.12 in tis way".
comment:12 Changed 3 years ago by rjollos
Yeah, that was odd. Seems to be better after changing [[Image(TracBacksMultiline.png,left)]] -> [[Image(TracBacksMultiline.png)]].
comment:13 Changed 17 months ago by rjollos
- Status changed from assigned to new
comment:14 Changed 17 months ago by ChrisNelson
- Cc ChrisNelson added




See #5456 for a similar issue.