Bugfix for #257: HTML Reader: `<p>` and header tags puts no output
This commit is contained in:
parent
39cf5d0b4a
commit
38d3d7be20
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub.
|
||||
|
||||
## 0.11.1 - 2 June 2014
|
||||
|
||||
This is an immediate bugfix release for HTML reader.
|
||||
|
||||
- HTML Reader: `<p>` and header tags puts no output - @canyildiz @ivanlanin GH-257
|
||||
|
||||
## 0.11.0 - 1 June 2014
|
||||
|
||||
This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated.
|
||||
|
|
|
|||
|
|
@ -224,9 +224,12 @@ class Html
|
|||
private static function parseText($node, $element, &$styles)
|
||||
{
|
||||
$styles['font'] = self::parseInlineStyle($node, $styles['font']);
|
||||
if (method_exists($element, 'addText')) {
|
||||
|
||||
// Commented as source of bug #257. `method_exists` doesn't seems to work properly in this case.
|
||||
// @todo Find better error checking for this one
|
||||
// if (method_exists($element, 'addText')) {
|
||||
$element->addText($node->nodeValue, $styles['font'], $styles['paragraph']);
|
||||
}
|
||||
// }
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue