Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
When the Chatterbox gets long words (normally URLs) it inserts spaces at intervals through the word. The HTML4.0 standard includes a 'soft hyphen' which would be a better option than the space. A soft hyphen is represented by '­'.

Unfortunately, this hyphen has different behaviour in different browsers. Not all of them follow the W3 recomendation at http://www.w3.org/TR/REC-html40/struct/text.html (see 9.3.3). However it would still be a better option than a space.

Some browsers will render the soft-hyphen as a hard-hyphen: It always shows a hyphen at the point where the ­ is inserted. This is incorrect, however it's just as good as a space because all browsers will automagically wrap after a hyphen.

Better browsers who follow the specs will only show the hyphen if it needs to wrap the line at that point. This makes it excellent for inserting into our CB text.

Not sure if your browser works? Well neither am I! If you see a hyphen in the middle of the following line then your browser will always show a hyphen. If nobody has mentioned your browser already, consider replying and letting me know if you get a hyphen or not. Ready for it? OK here comes:
This­Is­A­Really­Long­Word
If that looks like This-Is-A-Really-Long-Word then you're getting the hyphens. If it looks like ThisIsAReallyLongWord then you only get hyphens if they're needed.

Other than telling me what your browser does, what do you think of using them in the ChatterBox rather than spaces? It would make things look neater for (most|some) people and I imagine it would be a very simple patch for the pmdevs.

MacOS 9.22, Explorer 5.0 -> always hyphenates.
MacOS 9.22, Opera 6.0 -> hyphenates only when it needs to.


In reply to Space or Soft Hyphens by BigLug

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-28 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found