working on the dlang.org website

Brad Anderson eco at gnuk.net
Wed Jul 31 14:49:58 PDT 2013


On Wednesday, 31 July 2013 at 14:14:50 UTC, Vladimir Panteleev 
wrote:
> On Wednesday, 31 July 2013 at 07:35:34 UTC, Jeff Nowakowski 
> wrote:
>> By the way, the worst idea I've seen is to do hyphenation 
>> statically on the server side. How does the server know in 
>> advance how wide my browser window is or the text size? It 
>> can't. It's the client's job to flow the text.
>
> Both hyphenate.js and hyphenate.d statically insert shy 
> hyphens, which indicate potential line breaks to browsers. They 
> are invisible except when the line is wrapped at their position.
>
> Of course, this still doesn't work correctly in some browsers - 
> very old browsers render all shy hyphens as regular hyphens, 
> and some browsers include the invisible shy hyphen characters 
> when you select and copy text.

Someone in IRC,  Hackerpilot I believe, related how they copied 
and pasted some code from dlang.org into their editor and random 
things weren't getting syntax highlighted.  He only noticed what 
was causing it when he was moving the cursor around and his 
cursor wouldn't move the same number of arrow key presses he made.

Invisible characters breaking my code is pretty much my greatest 
nightmare as a programmer.


More information about the Digitalmars-d mailing list