From 8ab6f64addc3d6431aa54f49d28bd0d280f78ada Mon Sep 17 00:00:00 2001 From: Zachary Rankin Date: Tue, 27 May 2014 22:05:34 -0700 Subject: [PATCH 1/2] Fix a minor typo in the text styles example --- docs/elements.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/elements.rst b/docs/elements.rst index c86d1074..f2bf7791 100644 --- a/docs/elements.rst +++ b/docs/elements.rst @@ -84,7 +84,7 @@ Inline style examples: $textrun = $section->addTextRun(); $textrun->addText('I am bold', array('bold' => true)); $textrun->addText('I am italic', array('italic' => true)); - $textrun->addText('I am colored, array('color' => 'AACC00')); + $textrun->addText('I am colored', array('color' => 'AACC00')); Defined style examples: From 38d3d7be20e6eb8d5f56e77515a49ceb41b676b6 Mon Sep 17 00:00:00 2001 From: Ivan Lanin Date: Mon, 2 Jun 2014 18:27:23 +0700 Subject: [PATCH 2/2] Bugfix for #257: HTML Reader: `

` and header tags puts no output --- CHANGELOG.md | 6 ++++++ VERSION | 2 +- src/PhpWord/Shared/Html.php | 7 +++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd4d6f34..59cbba6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: `

` 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. diff --git a/VERSION b/VERSION index 142464bf..027934ea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.11.0 \ No newline at end of file +0.11.1 \ No newline at end of file diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 83292a3a..8abfea2f 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -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; }