Skip to content

Conversation

@velPL
Copy link

@velPL velPL commented May 26, 2022

Description

This pull request adds a feature which allows to set own regular expression for Headings detection in \PhpOffice\PhpWord\Reader\Word2007\AbstractPart::getHeadingDepth(). This is useful for Word documents produced in non-English versions of the software where default styling naming convention differs, resulting in all heading-styled elements becoming regular paragraphs in PHPWord. One can set this in php-word.ini file globally or use PhpOffice\PhpWord::setHeadingDepthRegexp() anywhere in application

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported (there is one complaint on \PhpWord\Element\TOC.php which has already been there)
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
velPL added 2 commits May 26, 2022 16:05
…ection regex on which actual header number will be set for provided custom detection regex
@velPL
Copy link
Author

velPL commented Jul 25, 2022

Updated the feature to allow setting at which position of the regex matches actual heading number is expected to be set for the detection regex provided by user

@PowerKiKi PowerKiKi changed the base branch from develop to master November 16, 2022 21:08
@Progi1984 Progi1984 force-pushed the master branch 3 times, most recently from 2d9f999 to e458249 Compare August 30, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant