View Single Post
Old 12-28-2013, 03:17 PM   #12
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Using a <p> </p> paragraph enclosing a single non-breaking space character to create vertical whitespace or 'pseudo blank lines' is extremely common practice in my experience. I prefer using css top margins myself but hoping for the former to go away is pointless.

But this is beside the point because I don't understand in what way you think the calibre editor is not handling them properly. Importing the html in cybmole's attached zip I see the unicode version of the nbsp (the \xa0 char) syntax-highlighted in yellow rather than the default background colour of the editor which is used to display the normal space char. See attached. Some other unicode special chars (e.g. mdash, ndash but not hellip or smart quotes) are also syntax highlighted. Admittedly, the easy visibility of these unicode chars depends which editor theme you have selected. The default theme (pyte-light) highlights them in yellow. Unfortunately, currently if you're using one of the dark themes, the syntax-highlighting of these chars is difficult to see, so I'm sticking with the default pyte-light until Kovid has time to implement full customisation of themes.

Moving onto Find/Replace, if I select one of these 'empty paragraphs' and use it in the Find box, I have no problem at all finding or replacing with Mode set to either Normal or Regex. Alternatively, if I want to search only for the unicode nbsp char then I type \xa0 in the Find box and search in Regex Mode.
Attached Thumbnails
Click image for larger version

Name:	nbsp.jpg
Views:	594
Size:	32.6 KB
ID:	117292  
jackie_w is offline   Reply With Quote