Re: breaking hyphen?



JRS: In article <1130315748.654045.14080@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
dated Wed, 26 Oct 2005 01:35:48, seen in news:comp.infosystems.www.autho
ring.html, Alan Wood <alan.wood@xxxxxxxxxx> posted :
>
>One possible improvement would be to add a condition that a break
>should not be allowed if it would leave a string of 3 or fewer
>characters at tne end or start of a line.

ISTR that 3 should be acceptable; breaking "hot-dog" seems OK,
especially if there are not many characters per line.

> Another possible improvement
>would be not to allow a break between a hyphen and a number, so that
>negative numbers are not broken.

Latter is not so good if the text happens to contain Part
#Q235-987-577-875-755-G

Maybe allow break before hyphen-minus if it has digits on both sides?

I presume hyphen-minus is \u002D, hyphen and minus are above \u007F,
hyphen always allows break and minus never does.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
.



Relevant Pages

  • RE: Return an Alpha based on number position in a word
    ... Actually, if the "J" is moved to the beginning of the string in C1, the ... formula can shrink even more, because the double minus signs are not ... Instead of (112 characters): ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Help with character encodings
    ... Is there any easy way I can change them all to plain old ASCII '-' ??? ... If you want to replace that with the more familiar HYPHEN-MINUS you can use the string replace, but stick will all unicode values so you don't provoke a conversion to an ascii encoded string ... If you are going to display it via a GUI that understands UTF-8, then encode the string as utf8 and display it -- no need to convert the hyphens. ...
    (comp.lang.python)
  • Re: Float to String
    ... string contains three characters, blank, plus, and minus. ... Subject: Float to String ... > Monty Python's the Meaning of Life ...
    (comp.lang.ada)
  • Re: Why re.match()?
    ... You want to duplicate the whole lot, minus two ... characters. ... pattern to some prefix of your 4GB string? ... To have a special-case ...
    (comp.lang.python)
  • Re: Float to String
    ... David C. Hoos, Sr. ... > string contains three characters, blank, plus, and minus. ...
    (comp.lang.ada)