Opened 16 years ago
Last modified 15 months ago
#7486 new defect
wrong space in diff output
Reported by: | moo | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | version control/changeset view | Version: | 0.11-stable |
Severity: | normal | Keywords: | diff space |
Cc: | phpxcache@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
i'm not sure if this applies to other mimetype syntax highligher
See URL: http://linuxfire.com.cn/BadGirl/changeset/290
the new "num0_254" is EXPECTED to be align to num1_254 but it is ACTUALLY 1 char off and align to "("
actual code output:
<th>114</th><th> </th><td class="l"><span> <del> </del> num0_254,</span> </td>
expected code output
<th>114</th><th> </th><td class="l"><span> <del> </del> num0_254,</span> </td>
please note the difference is, "</del> " is changed to "</del> "
tech reason: although space following is recognized as space, e.g.: " " is same as " ", but space following the "<tag>" is not. "</del> " should be escape as "</del> "
Attachments (0)
Change History (9)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
"The only spaces that ought to be displayed are the ones that were deleted"
neither FF3 or IE is rendering the correct number of spaces here.
i'm not sure how the diff algo works. but i'm sure about the space after ">", it's never rendered
{{{ #!html <span style="background:red;color:white"> a</span><br> <span style="background:red;color:white"> a</span> }}}
rendered as:
aa
if you need the space after "</del>", escape it as " ", if you think the space shouldn't be there, simply remove it instead of rely on the mystery browser bahavoir.
comment:3 by , 16 years ago
btw, u can download the unidiff from http://linuxfire.com.cn/BadGirl/changeset/290?format=diff&new=290 and render it in your local trac
u can also highlight tab by "/<TAB>" (search for tab) in vim and u'll see the tab changes. i suppose the tab/space changes explains the reason why there is space after </del>
btw, not just space after ">" but also space at line begining like
{{{ #!html <div style="font-family: mono, monospace"> - no space - one space<br> - one nbsp<br> - one nbsp and a space<br> - one space and a nbsp<br> </div> }}}
is rendered as
- one nbsp
- one nbsp and a space
- one space and a nbsp
you think they're same rendered, they're not
i forgot to add monospace to the "<span> a</span>" example, here we go:
{{{ #!html <span style="background:red;color:white; font-family: mono, monospace"> a</span><br> <span style="background:red;color:white; font-family: mono, monospace"> a</span> }}}
rendered as
aa
comment:4 by , 16 years ago
oops, forgot a <br>
{{{ #!html <div style="font-family: mono, monospace"> * no space<br> - one space<br> * no space<br> - one nbsp<br> * no space<br> - one nbsp and a space<br> * no space<br> - one space and a nbsp<br> * no space<br> </div> }}}
is rendered as
- one space
* no space
- one nbsp
* no space
- one nbsp and a space
* no space
- one space and a nbsp
* no space
sorry for the spam/noisy
comment:5 by , 16 years ago
Keywords: | diff added |
---|---|
Milestone: | 0.11.2 → 0.11.3 |
comment:6 by , 10 years ago
Milestone: | next-minor-0.12.x → next-stable-1.0.x |
---|
comment:7 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:8 by , 5 years ago
Milestone: | next-stable-1.2.x → next-stable-1.4.x |
---|
I don't understand why you think there should be an after the </del> tag. The only spaces that ought to be displayed are the ones that were deleted. And FF3 anyways seems to be rendering the correct number of spaces. Not sure exactly why there's a space after the </del> tag, but it's harmless.