Closed
Bug 417931
Opened 17 years ago
Closed 16 years ago
insertHyphenatedWord doesn't respect whitespace at all
Categories
(Other Applications Graveyard :: ChatZilla, defect)
Other Applications Graveyard
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)
References
()
Details
(Whiteboard: [cz-0.9.85])
Attachments
(1 file)
4.91 KB,
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
The munger uses insertHyphenatedWord everywhere, when it has plain text it wants to add; the problem is that it mearly splits the text up into 20-character chunks (almost), rather than looking for sections of non-whitespace that are >=20ch. This means you get output like this:
Then I guess that <wbr/>(compiled) Python <wbr/>code does not have <wbr/>a simple logical <wbr/>(not texture) repres<wbr/>entation that can <wbr/>be accessed and <wbr/>manipulated from <wbr/>within a Python <wbr/>program, like in <wbr/>e.g. in Mathematica.<wbr/> Is this correct?
splitLongWord looks +/- 5ch for a good place to split, but lands in the middle of "representation" here and has nowhere to go. I think it should probably be using the same regexp as the munger entry to find places to split (or we should find a better way to apply just the word-hyphenator munger to some text).
Comment 1•17 years ago
|
||
Can we just trust Gecko to wrap the spaces? If so, we can simply match for 20+ continuous non-space characters, and split there only (send them into splitLongWord). Does that make sense?
Assignee | ||
Comment 2•17 years ago
|
||
Yes, we should do some approximation of the munger regexp (or use it directly) to find suitable text to split.
Assignee | ||
Comment 3•16 years ago
|
||
The main aim of the split is to differentiate between cases we know need splitting (insertHyphenatedWord) and cases we haven't yet checked (insertText). insertText does a very, very basic munger-like process on the text to call insertHyphenatedWord on the long bits it finds.
I also optimised the use of <span>s when these two functions are used.
Assignee: rginda → silver
Status: NEW → ASSIGNED
Attachment #383257 -
Flags: review?(gijskruitbosch+bugs)
Comment 4•16 years ago
|
||
Comment on attachment 383257 [details] [diff] [review]
Split insertHyphenatedWord into insertText and itself
This looks good! r=me
Attachment #383257 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Comment 5•16 years ago
|
||
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.85]
Updated•3 months ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•