Checking if we have headers (#2).
This commit is contained in:
parent
19d2f29092
commit
7fdc36425d
|
@ -433,6 +433,10 @@ if( !class_exists('ExToC') ) {
|
|||
private function exctract_headings($pagenum) {
|
||||
/** 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 ) {
|
||||
|
|
Loading…
Reference in New Issue