• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Clicking on a code sample from search results puts the code all on one line

Enthusiast ,
Jul 22, 2021 Jul 22, 2021

Copy link to clipboard

Copied

Hello friends

I'm using RH 2017 (13.0.2.334). I'm running into an odd problem. I have a fairly long code sample in a topic. In the generated output (Reponsive HTML5), RoboHelp is often putting everything in the code sample on one line when I click on the topic from the search results.

 

It looks really bad, like this:

2021-07-22_16-14-14.png

 

However, when I click on the topic from the TOC, or use the Next / Prev buttons to arrive at the topic, it looks fine, like this:

2021-07-22_16-13-37.png

The problem occurs only when clicking on the topic link from search results.

 

The code sample in question has this structure:
<div class="ExampleLong">
<pre>

<code>

Code Stuff Here

</code>

</pre>
</div>

 

It seems like a RoboHelp bug to me. Has anyone else seen or been able to duplicate this?

I tried adding in a style definition in my CSS file for the pre tag to see if that would help.

It made no difference.

Views

169

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2021 Jul 22, 2021

Copy link to clipboard

Copied

Lol! I thought I hit weird problems. 😛

 

I'll have a go when I get "home" (woo! lockdown 5!) but perhaps there's something that's setting pre or code to inline in certain circumstances? As always I suggest inspecting using the browser dev tools, to see if you can spot anything.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Thanks Amebr. I do get some odd ones. 🙂 I think this might be one of these unsolvable intermittent problems.

 

For example, this morning I looked at it again. After I regenerated the help, I'm now seeing that if I put quotation marks around the search term, it does tend to show the code sample as it should. If I don't, it doesn't.

 

Here's a video if anyone is interested.

 

I don't get it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

I did a shonky test in Travel the Whirls. Added just this to the default.css:

code {

display: block;

background-color: grey;

border: grey;

}

Added a topic called Code Sample with your sample code plus 3 or 4 lines of pseudo-VBA.

 

I couldn't replicate the collapse, but maybe my code sample wasn't long enough. Could you try in a clean test project, with a single sample topic, first with just the default css and then with the bare minimum of css changes, to see if maybe it's something in your css conflicting with whatever RH2017 does when it opens the search link (I feel like it didn't/doesn't use the standard css but injects "stuff"??) ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

After seeing this thread, I thought I'd do a quick check as my current project is very code-heavy...and I'm having the EXACT same issue 😞 

Mark_Noc_0-1627458833566.png

Here's the same page but without using the search term:

Mark_Noc_2-1627458962597.png

So I would say there is definitely a bug here with Robohelp itself.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

Thanks for testing that @Mark_Noc.

 

That means I can stop banging my head for a solution.
Out of curiosity, what version of RH are you using, and what is your generated output?

(Also, that's pretty neat that your project is for or related to the Microsoft Flight Simulator! In fact, just last night, I was trying out the Microsoft Flight Simulator X. And with the flight realism turned up all the way, I feel proud of the fact that I managed to land my twin engine prop plane at three different airports in one of the beginner missions.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

Believe it or not, I'm using the very latest update to RH (2020.5), so it appears that this has been an issue for some time! As for the output, this particular project uses the Responsive HTML5 output. And yes, it's MSFS! Or more precisely the SDK documentation for people to make custom scenery and aircraft within the simulation... it's a fascinating project. Oh, and I recommend the latest FS if you liked FSX! The realisim is off the charts...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

@Mark_Noc- Good to know we're helping Adobe with their product testing, huh? But I'm no stranger to that. Our users tell us the same things when they discover a longstanding bug in our software.

 

I've filed this bug report:

https://tracker.adobe.com/#/view/RH-9819

 

Feel free to add your own comments and experience there.

 

While I doubt they'll release a fix for RH 2017, I hope someone can get me a fixed script file I can use at least.

 

Regarding MSFS, I'll have to try the latest! Sounds pretty cool. Good luck with your project!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2021 Aug 02, 2021

Copy link to clipboard

Copied

LATEST

I have added to the bug report that the same issue occurs in RoboHelp 2020.5.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp