Closed
Bug 268168
Opened 20 years ago
Closed 20 years ago
[mozTXTToHTMLConv] "x^2" text to html conversion is broken for non-integer powers and is not implemented for negative powers
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
People
(Reporter: engel, Assigned: engel)
Details
Attachments
(1 file)
2.63 KB,
patch
|
BenB
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
When a text/plain message is displayed, "^" is interpreted as "power" and is displayed as "<sup>..</sup>" where appropriate. The current implementation is somewhat incomplete/broken. a) O.k.: "x^2" is displayed as "x<sup>2</sup>". b) Broken: "x^0.5" is displayed as "x<sup>0</sup>.5", however "x<sup>0.5</sup>" would be correct. c) Not implemented: "x^-2" is displayed as is, while ""x<sup>-2</sup>" would be nicer. To test this behavior, compose the following message and save it as Draft (as text/plain; if text/html is your default message format hold "Shift" while pressing the "Compose" button). Use <sup> for x^2, x^-2, x^0.5; use "<sup>2</sup>" for x^2-1 and x^2. Do not use <sup> for x^b, x^2y etc.
Assignee | ||
Comment 1•20 years ago
|
||
The relevant code is at http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp&rev=1.76&root=/cvsroot#931
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•20 years ago
|
||
Also converts [f(x)+y]^2, {f[g(x)]+y}^2 [not only (x+y)^2] to "...<sup>2</sup>".
Assignee | ||
Updated•20 years ago
|
Attachment #164966 -
Flags: superreview?(darin)
Attachment #164966 -
Flags: review?(cbiesinger)
Updated•20 years ago
|
Attachment #164966 -
Flags: review?(cbiesinger) → review?(ben.bucksch)
Comment 3•20 years ago
|
||
Comment on attachment 164966 [details] [diff] [review] Proposed patch, fixes cases b) and c) please re-request sr from me once you have a r+ from ben (or some other qualified reviewer)
Attachment #164966 -
Flags: superreview?(darin)
Comment 4•20 years ago
|
||
Comment on attachment 164966 [details] [diff] [review] Proposed patch, fixes cases b) and c) r=BenB thanks for the well-written patch
Attachment #164966 -
Flags: review?(ben.bucksch) → review+
Assignee | ||
Updated•20 years ago
|
Attachment #164966 -
Flags: superreview?(darin)
Comment 5•20 years ago
|
||
Comment on attachment 164966 [details] [diff] [review] Proposed patch, fixes cases b) and c) sr=darin
Attachment #164966 -
Flags: superreview?(darin) → superreview+
Assignee | ||
Comment 6•20 years ago
|
||
Thank you for the efficient reviewing process! I do not have CVS write access, so everyone should feel free to checkin this patch.
Comment 7•20 years ago
|
||
timeless just landed this fix: Bug 268168 [mozTXTToHTMLConv] "x^2" text to html conversion is broken for non-integer powers and is not implemented for negative powers patch by Hans-A.Engel@unibas.ch r=benb sr=darin
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•