Checking if we have headers (#2).
This commit is contained in:
parent
19d2f29092
commit
7fdc36425d
|
@ -434,6 +434,10 @@ if( !class_exists('ExToC') ) {
|
|||
/** find all header tags within the page **/
|
||||
preg_match_all('/(<h([1-6]{1})[^>]*>).*<\/h\2>/msuU', $this->pages[$pagenum-1], $matches, PREG_SET_ORDER);
|
||||
|
||||
if (count($matches) == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Check the headings that are desired */
|
||||
if( count($this->options['heading_levels']) != 6 ) {
|
||||
$new_matches = array();
|
||||
|
|
Loading…
Reference in New Issue