Releases: hexydec/htmldoc
HTMLdoc v1.6.1
Added typed properties which removes support for PHP 7.3.
Updated dependencies.
HTMLdoc v1.6.0
This release adds a new feature and fixes some compatibility issues:
- Attribute selectors can now be specified as non case sensitive
- Added tests
- Fixed compatibility issue withPHP 8.1
- Updated dependencies
HTMLdoc v1.5.0
This release adds some new document anipulation methods, and fixes a bug:
- Added
htmldoc::before()
andhtmldoc::after()
- Added tests
- Fixed issue where if you removed nodes with
tag::remove()
, it caused issues intext::minify()
because it expects the keys to be sequential. It now re-keys the children after the node has been removed - Updated dependencies to fix issue with
undefined
in JSLite
HTMLdoc v1.4.0
This release updates the configuration and adds a safe
option to enable to software to be safer out of the box:
- Fixed bug in
tag::minify()
where the closing<html>
tag was not removed whenclose
is set totrue
- Updated minification settings in
config.php
to make IE comments removed by default now that IE11 is dead - Added a safe settings option that disables options that can be unsafe
- Updated tests.
- Updated dependencies
HTMLdoc v1.3.1
This is a bug fix release:
- Updated dependencies to fix issue with JSLite
- Fixed bug in
tag::minify()
where if a URL linked back to the homepage without a trailing/
, the URL was incorrectly minified to an empty string, which meant links back to the homepage didn't work
HTMLdoc v1.3.0
This release adds some new features to allow you manipulate documents more, the code is also stricter, and a few bugs have been fixed:
- Fixed issue where parse_url() was compared to an empty string instead of
null
- Added more attributes to the default list that can be safely removed
- Removed
config::setConfig()
in favour of using the property which can be read usinghtmldoc::__get()
- Updated
htmldoc::parse()
to do all the work of converting an HTML string into nodes, which is now returned rather than set. It can also extract nodes from an HTMLdoc object - Added
htmldoc::prepend()
andhtmldoc::append()
to add nodes to a document, this is implemented in thetag
object which clones the nodes and appends/prepends them to each object - Added
htmldoc::remove()
to enable nodes to be deleted - Added
:not()
selector processing totag::find()
- Made some comparisons stricter for performance
- Fixed issue in
htmldoc::parse()
where the return type was incorrect - Fixed issue with
tag::$singleton
where the property was defined as a bool but was used as and should be a string - Removed return type void from
tag::__clone()
as it must not return a type - Fixed issue with variable type in
tag::parse()
- Removed variables that were not being used
- Fixed incorrect return type in docblock
- Fixed issue in
tag::text()
where it returned an array, but it should return a string, updatedhtmldoc::text()
to expect this - Updated
htmldoc::open()
to check the$context
variable is a resource - Added viewport meta tag to index.php, and updated the options column to be as small as it can
- Double slashed regexp patterns in
htmldoc::$selectors
, fixed bug instring
where it captured brackets - Updated
htmldoc::parseSelector()
to accept a tokenise object instead of the input selector string - Enabled pseudo selectors to capture selectors in brackets in
htmldoc::parseSelector()
- Updated selector tests to be an array to make it easier to see tests, and added more tests to
findHtmldocTest::testCanFindElements()
- Added tests
- Fixed issue with some tests where some line endings were CRLF and some were LF, they are now all LF
- Tweaks to index.php
- Added documentation for new methods
- Fixed minor issues in documentation
HTMLdoc v1.2.5
This is a bug fix release that fixes some issues and improve validation of the output code:
- Remove
alt
from list of attributes that can be removed inconfig::__construct()
as this is not valid HTML - Allowed the
attribute
token to consume any extra following quotes to prevent capturing being offset when the input HTML is incorrect inhtmldoc::$tokens
- Fixed bug in
custom::parse()
where<script>
is allowed to start with an opening HTML comment, a leftover from the days when browsers didn't know what javascript was, but is still legal, it will now be removed by default - Fixed bugs in
doctype::parse()
where there were no tokens to capture anything in quotes, which has now been added tohtmldoc::$tokens
. It now stores the components in an array, and normalises whitespace - Added minifications to
doctype::minify
to lowercase directives in the doctype and convert quotes - The target attribute will now be removed if it is empty
- Added tests
HTMLdoc v1.2.4
This release fixes some issues, updates dependencies and adds a new feature:
- Fixed issue in
custom::parse()
where the regular expression didn't always capture all the code - Updated
tag::html()
to remove quotes from attributes that have a/
in it, also used a different function - Fixed issues with invalid charsets, updated code to check the charset is valid in
htmldoc::getCharsetFromHtml()
- Updated
performance.php
to show the compression ratio with more decimal places, also set some server vars to enable the hrefs within the page to be minified - Updated dependencies to use the latest versions of CSSdoc, JSlite, and tokenise
- Updated
htmldoc::attr()
andtag::attr()
to support setting attributes - Added tests.
HTMLdoc v1.2.3
This release updates the handling of custom tags:
- Unified the objects that handled style and script into a generic custom tag handler class
- Updated custom handler callback to pass the tag name to the handler class, and to the minification callback enabling a generic callback function, a default which is now configured in
config.php
- Updated jslite to 0.4.1 in
composer.json
HTMLdoc v1.2.2
This is a maintenance release that updates the following:
- Fixed bug in
htmldoc::key()
where the wrong return type was specified - Fixed issues in documentation
- Added more tests to
findHtmldocTest::testCanTraverseElements()
to test traversing as an array - Updated composer dependencies, which are now pegged to releases rather than @dev
- Added tests to show that the CSS and Javascript parser and minifiers work
- Updated
phpunit.xml
to removesrc/autoload.php
from coverage reports