4 Replies Latest reply on Feb 11, 2015 5:15 AM by NealonUX

    Tags broken across lines

    NealonUX Level 1

      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?

        • 1. Re: Tags broken across lines
          Amebr Level 4

          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.

          • 2. Re: Tags broken across lines
            Willam van Weelden Adobe Community Professional & MVP

            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.)

            • 3. Re: Tags broken across lines
              NealonUX Level 1

              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.

              • 4. Re: Tags broken across lines
                NealonUX Level 1

                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.