Removed headings with empty names
This commit is contained in:
parent
ca99fe94f0
commit
fcce0d14d6
1 changed files with 5 additions and 1 deletions
|
@ -32,9 +32,13 @@ public class GreenstoneTags {
|
|||
|
||||
//Get outline level
|
||||
String sLevel = Misc.getAttribute(currentNode, XMLString.TEXT_OUTLINE_LEVEL);
|
||||
String title = getTitle(currentNode).trim();
|
||||
if (sLevel == null || sLevel.isEmpty()) {
|
||||
return hnode;
|
||||
}
|
||||
if (title == null || title.isEmpty()) {
|
||||
return hnode;
|
||||
}
|
||||
int nLevel = Integer.parseInt(sLevel);
|
||||
|
||||
if (pageOpened) {
|
||||
|
@ -43,7 +47,7 @@ public class GreenstoneTags {
|
|||
|
||||
if (headingTags.equals(SECTIONS)){
|
||||
closeHeadingSections(hnode, nLevel);
|
||||
String title = getTitle(currentNode);
|
||||
|
||||
openHeadingSection(hnode, title);
|
||||
headerStack.offerFirst(Integer.parseInt(sLevel));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue