PHPWord/tests/PhpWord
Nicolas Dermine 4105a9aad1 improve `cloneBlock` regex
it wrongly matched `<w:pPr` when looking for `<w:p`

in that case the cloned block would not be valid XML,
and so the generated docx document could not be opened by Word

adding the `\b` word boundary to the regex fixes this.

the accompanying unit test failed with this message when trying to load
the generated file:

```
ErrorException: DOMDocument::loadXML(): Opening and ending tag mismatch:
p line 2 and body in Entity, line: 2
```

This might solve issues such as #681 and #664.
2018-02-02 17:03:49 +01:00
..
Collection Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-09 06:36:47 -02:00
ComplexType Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-09 06:36:47 -02:00
Element rename 'Object' classes to 'ObjectElement' (php 7.2 compatibility) (#1185) 2017-12-29 20:19:35 +01:00
Exception Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-09 06:36:47 -02:00
Metadata Merge branch 'develop' into feature/EnablePasswordProtection 2017-12-05 00:34:14 +01:00
Reader correctly parse on/off values (w:val="true|false|1|0|on|off") 2017-12-13 07:47:49 +01:00
Shared Add parsing of HTML links 2018-01-25 23:24:21 +01:00
Style Scrutinizer fixes 2017-11-26 22:55:37 +01:00
Writer rename 'Object' classes to 'ObjectElement' (php 7.2 compatibility) (#1185) 2017-12-29 20:19:35 +01:00
_files correctly parse on/off values (w:val="true|false|1|0|on|off") 2017-12-13 07:47:49 +01:00
_includes correctly parse on/off values (w:val="true|false|1|0|on|off") 2017-12-13 07:47:49 +01:00
IOFactoryTest.php Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-09 06:36:47 -02:00
MediaTest.php Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-09 06:36:47 -02:00
PhpWordTest.php Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-09 06:36:47 -02:00
SettingsTest.php Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-09 06:36:47 -02:00
StyleTest.php Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-09 06:36:47 -02:00
TemplateProcessorTest.php improve `cloneBlock` regex 2018-02-02 17:03:49 +01:00