jwulf / press-star

A node-based implementation of the popular Death Star authoring environment for PressGang / Docbook
4 stars 1 forks source link

Deathstar renders one word topic titles incorrectly #23

Closed mishaone closed 11 years ago

mishaone commented 11 years ago

One word topic titles render incorrectly in the deathstar. Details in attached conversation:

ping jwulf hey misha hey josh an odd thing is happening with the deathstar rendering http://deathstar1.usersys.redhat.com:3000/builds/14318-Infinispan_Query_Guide/#Overview7 the title of this topic is just "w" the title tags are set correctly and the property is set to Overview as well any ideas? ok so first off, what has happened here is that hte live patcher has rewritten the title incorrectly the line underneath the title shows that it's been live patched okay anything we need to do or should it just fix itself in the next rebuild? - doug is now known as doug-brb it will realign with a rebuild but of course i'm interested to know what went wrong to make it more robust cool did you change the title in the topic using the editor? nope, jwulf ok what i can see here is that it's: A one word title the last letter is w the new title is just "w" yeah so it looks like it could be: a one word title is incorrectly dealt with the last letter might be being dealt with like a space so maybe the patcher is preserving a leading space and catching the last letter i'll look into it thanks jwulf misha: could you do me a big favor, and open a github issue for it? sure jwulf thanks maybe just paste in this chat log
jwulf commented 11 years ago

The xsl renderer does not insert a space between the section number and the title, but rather Unicode character 160, which is  . It looks like a space (which is char code 32), but it's not.

So now we test for charCode 160, rather than ' '.

https://github.com/jwulf/publican-deathstar/commit/4f4874ba570e3936c80e0e5ba3a8f294c073321b

jwulf commented 11 years ago

You'll need to rebuild your book to get the new code in it.