All notable changes to this project will be documented in this file. Updates should follow the Keep a CHANGELOG principles.
- Added
hard_break
configuration option (#112, #115) - The
HtmlConverter
can now be instantiated with anEnvironment
(#118)
- Fixed handling of paragraphs in list item elements (#47, #110)
- Fixed phantom spaces when newlines follow
br
elements (#116, #117) - Fixed link converter not sanitizing inner spaces properly (#119, #120)
- Revised the sanitization implementation (#109)
- Fixed tag-like content not being escaped (#67, #109)
- Fixed thematic break-like content not being escaped (#65, #109)
- Fixed codefence-like content not being escaped (#64, #109)
- Added full support for PHP 7.0 and 7.1
- Changed
<pre>
and<pre><code>
conversions to use backticks instead of indendation (#102)
- Fixed issue where specified code language was not preserved (#70, #102)
- Fixed issue where
<code>
tags nested in<pre>
was not converted properly (#70, #102) - Fixed header-like content not being escaped (#76, #105)
- Fixed blockquote-like content not being escaped (#77, #103)
- Fixed ordered list-like content not being escaped (#73, #106)
- Fixed unordered list-like content not being escaped (#71, #107)
- Fixed sanitization bug which sometimes removes desired content (#63, #101)
- Fixed path to autoload.php when used as a library (#98)
- Fixed edge case for tags containing only whitespace (#99)
- Removed double HTML entity decoding, as this is not desireable (#60)
- Added the ability to invoke HtmlConverter objects as functions (#85)
- Fixed improper handling of nested list items (#19 and #84)
- Fixed preceeding or trailing spaces within emphasis tags (#83)
- Fixed conversion of empty paragraphs (#78)
- Fixed
preg_replace
so it wouldn't break UTF-8 characters (#79)
- Added
bin/html-to-markdown
script
- Changed default italic character to
_
(#58)
- Added escaping to avoid * and _ in a text being rendered as emphasis (#48)
- Removed the demo (#51)
.styleci.yml
andCONTRIBUTING.md
are no longer included in distributions (#50)
This release changes the visibility of several methods/properties. #42 and #43 brought to light that some visiblities were not ideally set, so this releases fixes that. Moving forwards this should reduce the chance of introducing BC-breaking changes.
- Added new
HtmlConverter::getEnvironment()
method to expose theEnvironment
(#42, #43)
- Changed
Environment::addConverter()
fromprotected
topublic
, enabling custom converters to be added (#42, #43) - Changed
HtmlConverter::createDOMDocument()
fromprotected
toprivate
- Changed
Element::nextCached
fromprotected
toprivate
- Made the
Environment
classfinal
- Empty HTML strings now result in empty Markdown documents (#40, #41)
- Added new
equals
method toElement
to check for equality
- Use Linux line endings consistently instead of plaform-specific line endings (#36)
- Cleaned up code style
- Changed namespace to
League\HTMLToMarkdown
- Changed packagist name to
league/html-to-markdown
- Re-organized code into several separate classes
<a>
tags with identical href and inner text are now rendered using angular bracket syntax (#31)<div>
elements are now treated as block-level elements (#33)
- Added support for PHP 5.6 and HHVM
- Enabled testing against PHP 7 nightlies
- Added this CHANGELOG.md
- Fixed whitespace preservation between inline elements (#9 and #10)
- Preserve placeholder links (#22)
- Added CircleCI config
<pre>
blocks are now treated as code elements
- Dropped support for PHP 5.2
- Removed incorrect README comment regarding
#text
nodes (#17)
- Added the ability to blacklist/remove specific node types (#11)
- Line breaks are now placed after divs instead of before them
- Newlines inside of link texts are now removed
- Updated the minimum PHPUnit version to 4.*
- Added options to customize emphasis characters
- Added option to strip HTML tags without Markdown equivalents
- Added
convert()
method for converter reuse - Added ability to set options after instance construction
- Documented the required PHP extensions (#4)
- ATX style now used for h1 and h2 tags inside blockquotes
- Newlines inside blockquotes are now started with a bracket
- Fixed some incorrect docblocks
__toString()
now returns an empty string if input is empty- Convert head tag if body tag is empty (#7)
- Preserve special characters inside tags without md equivalents (#6)
- Fixed first line indentation for multi-line code blocks
- Fixed consecutive anchors get separating spaces stripped (#3)
- Initial release