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

Tags broken across lines

Community Beginner ,
Feb 09, 2015 Feb 09, 2015

Copy link to clipboard

Copied

Robohelp HTML 11.

Rh is breaking strings into lines. The <p> below is actually broken into 3 lines, in this file, lines 69, 70, and 71.
While this does not adversely affect the outputs, it makes Find and Replace in Files nearly useless.

Say I want to delete every occurrence of the image tag seen in the code below. I can't because sometimes the line break could be anywhere in that tag, so my universal search finds no match.

<img
src="Plus_Button.jpg" alt=""
style="border: none;" border="0" />


Any ideas?

Views

298

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

correct answers 1 Correct answer

Community Expert , Feb 09, 2015 Feb 09, 2015

I don't believe you can change Robohelp's behaviour, but you can use regular expressions to find the text.

For your example, if you don't know regular expressions, the easiest way to achieve it would be to copy the code into a text editor so you can remove the line breaks and replace all the spaces with \s*. This means "find zero or more white space characters". White space includes spaces, carriage returns, line feeds, etc. This is basic and won't find examples with any variations (e.g. differen

...

Votes

Translate

Translate
Community Expert ,
Feb 09, 2015 Feb 09, 2015

Copy link to clipboard

Copied

I don't believe you can change Robohelp's behaviour, but you can use regular expressions to find the text.

For your example, if you don't know regular expressions, the easiest way to achieve it would be to copy the code into a text editor so you can remove the line breaks and replace all the spaces with \s*. This means "find zero or more white space characters". White space includes spaces, carriage returns, line feeds, etc. This is basic and won't find examples with any variations (e.g. different border size) but will let you find specific examples where the main hurdle is the extra spacing and line breaks.

So you'd end up with:

<img\s*src="Plus_Button.jpg"\s*alt=""\s*style="border:\s*none;"\s*border="0"\s*/>

NOTE: Make sure you take a backup before you run any Replace All actions and check multiple affected topics to make sure nothing untoward has happened.

Paste the resulting text into the Find box and make sure the Use checkbox is ticked and Regular Expression is selected. You might have to click the Show Options icon to see this option.

If you want greater control, TextCrawler is a great app, and has a nifty test function where you can paste in several examples while you work on your regular expression, to make sure you are finding all correct instances before you (accidentally) run the script on your production project ( ).

HTH.

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
LEGEND ,
Feb 10, 2015 Feb 10, 2015

Copy link to clipboard

Copied

Rh breaks up the html. Since whitepace is ignored in HTML, this is not a problem.

In addition to Amber's suggestions, you can also use scripting to parse the topics. In that case you don't need to worry about the line breaks at all. (The same warning applies to scripting: make a backup.)

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 Beginner ,
Feb 11, 2015 Feb 11, 2015

Copy link to clipboard

Copied

LATEST

Thanks, William. I'll see how it goes. I could tell that the white-space breaks weren't harming the output; they were just making searches inconvenient with the tools I was using. I wonder why RoboHelp makes those breaks.

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 Beginner ,
Feb 11, 2015 Feb 11, 2015

Copy link to clipboard

Copied

Thanks, Amebr! I'll try it. I've used regular expressions in the past, but haven't become proficient. This will be a good learning exercise--on sandbox copies of the documents! I'll let you know how it turns out.

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