Closed tallforasmurf closed 11 years ago
Commit 63be58b
However there is still ambiguity which results from the PGDP formatting rules:
<4 blank lines>
CHAPTER HEAD
<2 blank lines>
A paragraph of text...
<2 blank lines>
A SUBHEAD
<2 blank lines>
Another paragraph
2 blank lines are required after the chapter, and 2 are required before the subhead, which means: a SINGLE paragraph between a CHAPTER and a SUBHEAD will also be seen as a subhead. Two before, two after...
If there are zero or more than one paragraphs between the chapter and the subhead, no problem.
Right now html convert requires for a subhead (h3markup) that
This is wrong on a couple of counts. Test 1 prevents proper html convert of a selection that starts with a subhead. It is only in there to avoid an index error in making test 3, of the preceding para.
But also, test 3 is there because the PG standard for a chapter head is 4 blanks, text, 2 blanks, so the first para of a chapter would look like a subhead if you didn't rule that out.
However some books do have:
So the proper test for a subhead is only that it is preceded AND followed by exactly two blank lines. So the if statement should check: