Skip to main content
Known Participant
September 11, 2013
Question

WebHelp Search Displays Selected Topics Without Acknowledging LF

  • September 11, 2013
  • 1 reply
  • 453 views

I have a text document using UNIX style line breaks that I run through a parser to create multiple help topics.

These topics display normally (see attached image) when called directly, rather than through WebHelp and when selected from the Contents or Index tabs. 

However ,when selected through the search tabs, the LF character seems to be ignored. 

Has anyone else seen this?  This feels like a bug.

This topic has been closed for replies.

1 reply

Jeff_Coatsworth
Community Expert
Community Expert
September 11, 2013

What version of RH?

MDoogieYAuthor
Known Participant
September 11, 2013

RoboHelp 10.0.0.287.  Sorry, that would have been useful to mention.

I also wanted to add that it seems like the <pre> tag is being ignored.

in our usage it is <PRE><SPAN> some text
some text
some text
</SPAN></PRE>
That should be preserved in the display, but for some reason isn't being preserved.
-m

Willam van Weelden
Inspiring
September 11, 2013

RH doesn't normally work with pre tags. The search function adds spans for highlighting, so removing the highlight will probably solve this. But that's not what you want.

Can you try the following: Replace the pre tag with a div tag. Add a class to the div, for example 'preserve-lines'. In your CSS, add the following definition:

div.preserve-lines {

white-space: pre-line;

}

This will add line breaks as they were in the source code.

Of course, RoboHelp is replacing the HTML when adding highlighting, so it may be stripping the line breaks as well. In that case, the easiest solution (short of hacking into the highlighting code (trust me, you don't want to go there)) is to replace the line breaks by br tags on generation and use a paragraph instead of a pre element.

Greet,

Willam