Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
What version of RH?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
That didn't work. We tried a few variations, but they all ultimately get commented out by RoboHelp in the generation process. I ended up having to disable highlighting; which did not best please my development team. They've requested I file a bug against RoboHelp.