Fixed: Flare reformatting my HTML

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.

Fixed: Flare reformatting my HTML

Postby czupke on Thu Jul 30, 2020 1:25 pm

My HTML was getting frequently getting reformatted by Flare. The first image below shows how I formatted the HTML. Then when I used the XML editor, Flare would reformat my HTML to look like the lower image, which was a real problem in long, complex files.

I finally figured out how to consistently cause the problem to happen. I tested it in brand-new empty projects on my local disk and OneDrive, in both Flare 18 r2 and Flare 20.
· If my html looks like the below with the <p></p> it works fine.
· If I remove the <p></p> then the problem occurs.

In my real project file have added the <p></p> tags around all the text in my list items.  It seems to be working fine.

Caveat: text in <pre></pre> tags is still affected. Line breaks before and after the block are removed.
 
Update -- using <pre> or <h2> tags works as well as the <p></p> -- Flare wasn't handling untagged content well. And, I know, that it's sloppy to not tag all my content. It's an inherited project.
=============================================
Properly formatted HTML
=============================================

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
    <head>
    </head>
    <body>
        <h1>nested-ordered-lists</h1>
        <p>Outside the nested ordered lists.</p>
        <ol>
            <li>
               <p>Before inner ordered list.</p>
                <ol>
                    <li>Inside the nested ordered lists.
                   </li>
                </ol>
            </li>
        </ol>
    </body>
</html>
_________________________________________________



=============================================
Reformatted HTML
=============================================

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
<head>
</head>
<body>
<h1>nested-ordered-lists</h1>
<p>Outside the nested ordered lists.</p>
<ol>
<li>
Before inner ordered lists.
<ol><li>Inside the nested ordered lists.
</li></ol></li>
</ol>
</body>
</html>
czupke
Jr. Propeller Head
 
Posts: 2
Joined: Sun Jul 05, 2020 4:21 pm

Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 3 guests

cron