diff --git a/src/lib/ic/TZOPart.php b/src/lib/ic/TZOPart.php index 57a2501..32f0594 100644 --- a/src/lib/ic/TZOPart.php +++ b/src/lib/ic/TZOPart.php @@ -106,10 +106,11 @@ class TZOPart // chapter markers $html = preg_replace_callback( - '/
(?:# )?(\(\d+\)|([\w\s?]+))<\/center>/', + '/
(?:# )?(\((\d+)\)|([\w\s?]+))<\/center>/', function ($matches) { $number = $matches[1]; - return '

'.$number.'

'; + $id = isset($matches[2]) && $matches[2] != '' ? 'chapter'.$matches[2] : ''; + return '

'.$number.'

'; }, $html );