Why doesn't Flare give a warning when there's text outside of paragraph tags?
For example, we have two unordered lists, and between them, there's a line of text that introduces the second list. This is material that we received from previous people, btw.
The only reason we found it was that the formatting was messed up in the build. There was no space at all between the last list item of the first list and the introductory paragraph for the second list. And we looked, and there were no paragraph tags around it.
I realize that this is not "bad XML" in the technical sense. But it's wrong. So maybe I should rephrase my initial question. Is there a setting that will raise alerts for such things?
In a similar vein, is there any way to find files with invalid XML other than running a report or doing a build and looking at the build log? Some sort of indicator on the file icon in the content explorer?
Text outside of paragraph tags
Re: Text outside of paragraph tags
There's no indicator or alert for this. But perhaps showing the left and top structure bars would help.
And I know you said you didn't want a report, but there is one that will show you exactly this problem. Under Analysis > Suggestions, select Markup Suggestions, then use the filter button to only show "Untagged text in topic body". You can double-click on each entry to be taken directly to the problem spot.
You do not have the required permissions to view the files attached to this post.
Re: Text outside of paragraph tags
Thank you! That's perfect.
Btw, I admire the names you chose as examples.
Btw, I admire the names you chose as examples.
Re: Text outside of paragraph tags
I can't take credit. It's from a sample/tutorial project supplied by MadCap. It's the Austin one. 
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Text outside of paragraph tags
I've got a situation where there's a <li> in a list and it's structured like this:
<li>This is a bit of text not in a paragraph
___<p>this is another bit in the same list item, in a paragraph</p>
______<MadCap:snippetBlock src="../../snippet/flsnp" />
</li>
As I understand it, this is not "good" XML but it still builds. But shouldn't that first line be inside a <p>? I have no idea how it got like that, but it's all over the place.
When I run the Markup Suggestions report, looking for Untagged text in topic body, it doesn't find this (because it's inside a <li>).
Q1: Is this actually incorrect XML?
Q2: Is there any way I can do a global search to tidy this up?
<li>This is a bit of text not in a paragraph
___<p>this is another bit in the same list item, in a paragraph</p>
______<MadCap:snippetBlock src="../../snippet/flsnp" />
</li>
As I understand it, this is not "good" XML but it still builds. But shouldn't that first line be inside a <p>? I have no idea how it got like that, but it's all over the place.
When I run the Markup Suggestions report, looking for Untagged text in topic body, it doesn't find this (because it's inside a <li>).
Q1: Is this actually incorrect XML?
Q2: Is there any way I can do a global search to tidy this up?
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: Text outside of paragraph tags
I can't find anything that says it's not allowed, and the following example validated to both HTML 4.01 and XHTML 1.0 using the W3C validator.
As for searching, it might be possible with RegEx.
Code: Select all
<!doctype html>
<html>
<head>
<title>Title</title>
</head>
<body>
<ul>
<li>Some text
<p>Some more text</p>
</li>
<li>Some text</li>
</ul>
</body>
</html>-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Text outside of paragraph tags
Good to know that it's allowed, but how on earth do you even make that happen from within Flare? As far as I can see, the only way you can get the second <p> (the bit with "Some more text" in your example) is by messing around in the Code Editor. If you want to have that second paragraph, you have to turn paragraphs on in the li item (Ctrl +
and then both the first and second bits are shoved inside <p> tags when you press Enter.
It's also a pain in the behind trying to make things consistent, because you can't even just backspace to get them into a single paragraph. I suppose I'm just being a bit of a neat freak (which you'd find very hard to believe if you saw my desk!
).
It's also a pain in the behind trying to make things consistent, because you can't even just backspace to get them into a single paragraph. I suppose I'm just being a bit of a neat freak (which you'd find very hard to believe if you saw my desk!
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: Text outside of paragraph tags
It's pretty easy to do in Flare if you start with simple (not paragraph) lists.
You start with a simple list like so:
Then you want to enter a paragraph under Item two, so you press Enter to create a new list item, then press Tab to nest the list. Then you use the bullet button to remove the nested list, leaving only the paragraph.
You should be able to right-click on the li and select "Make Paragraph Item(s)" to insert p tags around the first paragraph.
Or if that doesn't work, you can click in the paragraph and use the Convert Paragraph to list item icon to turn it back into a list item. You can also press Shift+Tab to achieve the same thing, Then it's easy to delete and convert to paragraph lists.
You start with a simple list like so:
Code: Select all
<ul>
<li>One</li>
<li>Ttwo</li>
<li>Three</li>
</ul>
Code: Select all
<ul>
<li>One</li>
<li>Two
<p>New item</p>
</li>
<li>Three</li>
</ul>
Or if that doesn't work, you can click in the paragraph and use the Convert Paragraph to list item icon to turn it back into a list item. You can also press Shift+Tab to achieve the same thing, Then it's easy to delete and convert to paragraph lists.
You do not have the required permissions to view the files attached to this post.
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Text outside of paragraph tags
You are a star, I'll give all of those a go. 
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx