Commit 547df221 authored by Klaus Weidenbach's avatar Klaus Weidenbach
Browse files

Replace Mardownify library with html-to-markdown library.

parent 50e9d024
......@@ -30,10 +30,10 @@
"ext-openssl" : "*",
"sabre/dav" : "~3.2",
"michelf/php-markdown" : "^1.7",
"pixel418/markdownify": "^2.2",
"bshaffer/oauth2-server-php": "^1.9",
"ezyang/htmlpurifier": "^4.9",
"simplepie/simplepie": "~1.5"
"simplepie/simplepie": "~1.5",
"league/html-to-markdown": "^4.4"
},
"require-dev" : {
"php" : ">=7.0",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "21511c39f481ecdc20210f885d840787",
"content-hash": "527df9ff589187351b62bffb0c38e3a6",
"packages": [
{
"name": "bshaffer/oauth2-server-php",
......@@ -110,111 +110,119 @@
"time": "2017-03-13T06:30:53+00:00"
},
{
"name": "michelf/php-markdown",
"version": "1.7.0",
"name": "league/html-to-markdown",
"version": "4.4.1",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
"reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220"
"url": "https://github.com/thephpleague/html-to-markdown.git",
"reference": "82ea375b5b2b1da1da222644c0565c695bf88186"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/1f51cc520948f66cd2af8cbc45a5ee175e774220",
"reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220",
"url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/82ea375b5b2b1da1da222644c0565c695bf88186",
"reference": "82ea375b5b2b1da1da222644c0565c695bf88186",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"ext-dom": "*",
"ext-xml": "*",
"php": ">=5.3.3"
},
"require-dev": {
"mikehaertl/php-shellcommand": "~1.1.0",
"phpunit/phpunit": "4.*",
"scrutinizer/ocular": "~1.1"
},
"bin": [
"bin/html-to-markdown"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-lib": "1.4.x-dev"
"dev-master": "4.5-dev"
}
},
"autoload": {
"psr-0": {
"Michelf": ""
"psr-4": {
"League\\HTMLToMarkdown\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
"MIT"
],
"authors": [
{
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
"homepage": "https://michelf.ca/",
"role": "Developer"
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "http://www.colinodell.com",
"role": "Lead Developer"
},
{
"name": "John Gruber",
"homepage": "https://daringfireball.net/"
"name": "Nick Cernis",
"email": "nick@cern.is",
"homepage": "http://modernnerd.net",
"role": "Original Author"
}
],
"description": "PHP Markdown",
"homepage": "https://michelf.ca/projects/php-markdown/",
"description": "An HTML-to-markdown conversion helper for PHP",
"homepage": "https://github.com/thephpleague/html-to-markdown",
"keywords": [
"html",
"markdown"
],
"time": "2016-10-29T18:58:20+00:00"
"time": "2017-03-16T00:45:59+00:00"
},
{
"name": "pixel418/markdownify",
"version": "v2.2.1",
"name": "michelf/php-markdown",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/Elephant418/Markdownify.git",
"reference": "0160677f04c784550dd10fd72fdf3994967db848"
"url": "https://github.com/michelf/php-markdown.git",
"reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Elephant418/Markdownify/zipball/0160677f04c784550dd10fd72fdf3994967db848",
"reference": "0160677f04c784550dd10fd72fdf3994967db848",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/1f51cc520948f66cd2af8cbc45a5ee175e774220",
"reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8"
"type": "library",
"extra": {
"branch-alias": {
"dev-lib": "1.4.x-dev"
}
},
"type": "lib",
"autoload": {
"psr-4": {
"Markdownify\\": "src",
"Test\\Markdownify\\": "test"
"psr-0": {
"Michelf": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL"
"BSD-3-Clause"
],
"authors": [
{
"name": "Peter Kruithof",
"email": "pkruithof@gmail.com",
"homepage": "http://pkruithof.tumblr.com/"
},
{
"name": "Milian Wolff",
"email": "mail@milianw.de",
"homepage": "http://milianw.de"
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
"homepage": "https://michelf.ca/",
"role": "Developer"
},
{
"name": "Thomas Zilliox",
"email": "hello@tzi.fr",
"homepage": "http://tzi.fr"
"name": "John Gruber",
"homepage": "https://daringfireball.net/"
}
],
"description": "The HTML to Markdown converter for PHP ",
"homepage": "https://github.com/elephant418/Markdownify",
"description": "PHP Markdown",
"homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"markdown",
"markdownify"
"markdown"
],
"time": "2016-09-21T13:01:43+00:00"
"time": "2016-10-29T18:58:20+00:00"
},
{
"name": "psr/log",
......
......@@ -5,7 +5,7 @@
*/
use Michelf\MarkdownExtra;
use Markdownify\Converter;
use League\HTMLToMarkdown\HtmlConverter;
require_once("include/oembed.php");
require_once("include/event.php");
......@@ -495,9 +495,8 @@ function bb2diaspora($Text, $preserve_nl = false, $fordiaspora = true) {
$Text = str_replace(array('<','>','&'),array('&_lt_;','&_gt_;','&_amp_;'),$Text);
// Now convert HTML to Markdown
$md = new Converter(Converter::LINK_AFTER_CONTENT, false, false);
$Text = $md->parseString($Text);
$md = new HtmlConverter();
$Text = $md->convert($Text);
// It also adds backslashes to our attempt at getting around the html entity preservation for some weird reason.
......
../league/html-to-markdown/bin/html-to-markdown
\ No newline at end of file
......@@ -241,9 +241,29 @@ return array(
'HTMLPurifier_VarParser_Native' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php',
'HTMLPurifier_Zipper' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php',
'Hubzilla\\Import\\Import' => $baseDir . '/include/Import/Importer.php',
'Markdownify\\Converter' => $vendorDir . '/pixel418/markdownify/src/Converter.php',
'Markdownify\\ConverterExtra' => $vendorDir . '/pixel418/markdownify/src/ConverterExtra.php',
'Markdownify\\Parser' => $vendorDir . '/pixel418/markdownify/src/Parser.php',
'League\\HTMLToMarkdown\\Configuration' => $vendorDir . '/league/html-to-markdown/src/Configuration.php',
'League\\HTMLToMarkdown\\ConfigurationAwareInterface' => $vendorDir . '/league/html-to-markdown/src/ConfigurationAwareInterface.php',
'League\\HTMLToMarkdown\\Converter\\BlockquoteConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/BlockquoteConverter.php',
'League\\HTMLToMarkdown\\Converter\\CodeConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/CodeConverter.php',
'League\\HTMLToMarkdown\\Converter\\CommentConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/CommentConverter.php',
'League\\HTMLToMarkdown\\Converter\\ConverterInterface' => $vendorDir . '/league/html-to-markdown/src/Converter/ConverterInterface.php',
'League\\HTMLToMarkdown\\Converter\\DefaultConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/DefaultConverter.php',
'League\\HTMLToMarkdown\\Converter\\DivConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/DivConverter.php',
'League\\HTMLToMarkdown\\Converter\\EmphasisConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/EmphasisConverter.php',
'League\\HTMLToMarkdown\\Converter\\HardBreakConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/HardBreakConverter.php',
'League\\HTMLToMarkdown\\Converter\\HeaderConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/HeaderConverter.php',
'League\\HTMLToMarkdown\\Converter\\HorizontalRuleConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/HorizontalRuleConverter.php',
'League\\HTMLToMarkdown\\Converter\\ImageConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/ImageConverter.php',
'League\\HTMLToMarkdown\\Converter\\LinkConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/LinkConverter.php',
'League\\HTMLToMarkdown\\Converter\\ListBlockConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/ListBlockConverter.php',
'League\\HTMLToMarkdown\\Converter\\ListItemConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/ListItemConverter.php',
'League\\HTMLToMarkdown\\Converter\\ParagraphConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/ParagraphConverter.php',
'League\\HTMLToMarkdown\\Converter\\PreformattedConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/PreformattedConverter.php',
'League\\HTMLToMarkdown\\Converter\\TextConverter' => $vendorDir . '/league/html-to-markdown/src/Converter/TextConverter.php',
'League\\HTMLToMarkdown\\Element' => $vendorDir . '/league/html-to-markdown/src/Element.php',
'League\\HTMLToMarkdown\\ElementInterface' => $vendorDir . '/league/html-to-markdown/src/ElementInterface.php',
'League\\HTMLToMarkdown\\Environment' => $vendorDir . '/league/html-to-markdown/src/Environment.php',
'League\\HTMLToMarkdown\\HtmlConverter' => $vendorDir . '/league/html-to-markdown/src/HtmlConverter.php',
'Michelf\\Markdown' => $vendorDir . '/michelf/php-markdown/Michelf/Markdown.php',
'Michelf\\MarkdownExtra' => $vendorDir . '/michelf/php-markdown/Michelf/MarkdownExtra.php',
'Michelf\\MarkdownInterface' => $vendorDir . '/michelf/php-markdown/Michelf/MarkdownInterface.php',
......
......@@ -7,7 +7,6 @@ $baseDir = dirname($vendorDir);
return array(
'Zotlabs\\' => array($baseDir . '/Zotlabs'),
'Test\\Markdownify\\' => array($vendorDir . '/pixel418/markdownify/test'),
'Sabre\\Xml\\' => array($vendorDir . '/sabre/xml/lib'),
'Sabre\\VObject\\' => array($vendorDir . '/sabre/vobject/lib'),
'Sabre\\Uri\\' => array($vendorDir . '/sabre/uri/lib'),
......@@ -18,6 +17,6 @@ return array(
'Sabre\\CardDAV\\' => array($vendorDir . '/sabre/dav/lib/CardDAV'),
'Sabre\\CalDAV\\' => array($vendorDir . '/sabre/dav/lib/CalDAV'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Markdownify\\' => array($vendorDir . '/pixel418/markdownify/src'),
'League\\HTMLToMarkdown\\' => array($vendorDir . '/league/html-to-markdown/src'),
'Hubzilla\\' => array($baseDir . '/include'),
);
......@@ -22,10 +22,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
array (
'Zotlabs\\' => 8,
),
'T' =>
array (
'Test\\Markdownify\\' => 17,
),
'S' =>
array (
'Sabre\\Xml\\' => 10,
......@@ -42,9 +38,9 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
array (
'Psr\\Log\\' => 8,
),
'M' =>
'L' =>
array (
'Markdownify\\' => 12,
'League\\HTMLToMarkdown\\' => 22,
),
'H' =>
array (
......@@ -57,10 +53,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
array (
0 => __DIR__ . '/../..' . '/Zotlabs',
),
'Test\\Markdownify\\' =>
array (
0 => __DIR__ . '/..' . '/pixel418/markdownify/test',
),
'Sabre\\Xml\\' =>
array (
0 => __DIR__ . '/..' . '/sabre/xml/lib',
......@@ -101,9 +93,9 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
array (
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
),
'Markdownify\\' =>
'League\\HTMLToMarkdown\\' =>
array (
0 => __DIR__ . '/..' . '/pixel418/markdownify/src',
0 => __DIR__ . '/..' . '/league/html-to-markdown/src',
),
'Hubzilla\\' =>
array (
......@@ -378,9 +370,29 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'HTMLPurifier_VarParser_Native' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php',
'HTMLPurifier_Zipper' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php',
'Hubzilla\\Import\\Import' => __DIR__ . '/../..' . '/include/Import/Importer.php',
'Markdownify\\Converter' => __DIR__ . '/..' . '/pixel418/markdownify/src/Converter.php',
'Markdownify\\ConverterExtra' => __DIR__ . '/..' . '/pixel418/markdownify/src/ConverterExtra.php',
'Markdownify\\Parser' => __DIR__ . '/..' . '/pixel418/markdownify/src/Parser.php',
'League\\HTMLToMarkdown\\Configuration' => __DIR__ . '/..' . '/league/html-to-markdown/src/Configuration.php',
'League\\HTMLToMarkdown\\ConfigurationAwareInterface' => __DIR__ . '/..' . '/league/html-to-markdown/src/ConfigurationAwareInterface.php',
'League\\HTMLToMarkdown\\Converter\\BlockquoteConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/BlockquoteConverter.php',
'League\\HTMLToMarkdown\\Converter\\CodeConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/CodeConverter.php',
'League\\HTMLToMarkdown\\Converter\\CommentConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/CommentConverter.php',
'League\\HTMLToMarkdown\\Converter\\ConverterInterface' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/ConverterInterface.php',
'League\\HTMLToMarkdown\\Converter\\DefaultConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/DefaultConverter.php',
'League\\HTMLToMarkdown\\Converter\\DivConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/DivConverter.php',
'League\\HTMLToMarkdown\\Converter\\EmphasisConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/EmphasisConverter.php',
'League\\HTMLToMarkdown\\Converter\\HardBreakConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/HardBreakConverter.php',
'League\\HTMLToMarkdown\\Converter\\HeaderConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/HeaderConverter.php',
'League\\HTMLToMarkdown\\Converter\\HorizontalRuleConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/HorizontalRuleConverter.php',
'League\\HTMLToMarkdown\\Converter\\ImageConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/ImageConverter.php',
'League\\HTMLToMarkdown\\Converter\\LinkConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/LinkConverter.php',
'League\\HTMLToMarkdown\\Converter\\ListBlockConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/ListBlockConverter.php',
'League\\HTMLToMarkdown\\Converter\\ListItemConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/ListItemConverter.php',
'League\\HTMLToMarkdown\\Converter\\ParagraphConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/ParagraphConverter.php',
'League\\HTMLToMarkdown\\Converter\\PreformattedConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/PreformattedConverter.php',
'League\\HTMLToMarkdown\\Converter\\TextConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/Converter/TextConverter.php',
'League\\HTMLToMarkdown\\Element' => __DIR__ . '/..' . '/league/html-to-markdown/src/Element.php',
'League\\HTMLToMarkdown\\ElementInterface' => __DIR__ . '/..' . '/league/html-to-markdown/src/ElementInterface.php',
'League\\HTMLToMarkdown\\Environment' => __DIR__ . '/..' . '/league/html-to-markdown/src/Environment.php',
'League\\HTMLToMarkdown\\HtmlConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/HtmlConverter.php',
'Michelf\\Markdown' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/Markdown.php',
'Michelf\\MarkdownExtra' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/MarkdownExtra.php',
'Michelf\\MarkdownInterface' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/MarkdownInterface.php',
......
......@@ -434,64 +434,6 @@
"markdown"
]
},
{
"name": "pixel418/markdownify",
"version": "v2.2.1",
"version_normalized": "2.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/Elephant418/Markdownify.git",
"reference": "0160677f04c784550dd10fd72fdf3994967db848"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Elephant418/Markdownify/zipball/0160677f04c784550dd10fd72fdf3994967db848",
"reference": "0160677f04c784550dd10fd72fdf3994967db848",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8"
},
"time": "2016-09-21T13:01:43+00:00",
"type": "lib",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Markdownify\\": "src",
"Test\\Markdownify\\": "test"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL"
],
"authors": [
{
"name": "Peter Kruithof",
"email": "pkruithof@gmail.com",
"homepage": "http://pkruithof.tumblr.com/"
},
{
"name": "Milian Wolff",
"email": "mail@milianw.de",
"homepage": "http://milianw.de"
},
{
"name": "Thomas Zilliox",
"email": "hello@tzi.fr",
"homepage": "http://tzi.fr"
}
],
"description": "The HTML to Markdown converter for PHP ",
"homepage": "https://github.com/elephant418/Markdownify",
"keywords": [
"markdown",
"markdownify"
]
},
{
"name": "bshaffer/oauth2-server-php",
"version": "v1.9.0",
......@@ -748,5 +690,71 @@
"framework",
"iCalendar"
]
},
{
"name": "league/html-to-markdown",
"version": "4.4.1",
"version_normalized": "4.4.1.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/html-to-markdown.git",
"reference": "82ea375b5b2b1da1da222644c0565c695bf88186"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/82ea375b5b2b1da1da222644c0565c695bf88186",
"reference": "82ea375b5b2b1da1da222644c0565c695bf88186",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xml": "*",
"php": ">=5.3.3"
},
"require-dev": {
"mikehaertl/php-shellcommand": "~1.1.0",
"phpunit/phpunit": "4.*",
"scrutinizer/ocular": "~1.1"
},
"time": "2017-03-16T00:45:59+00:00",
"bin": [
"bin/html-to-markdown"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.5-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"League\\HTMLToMarkdown\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "http://www.colinodell.com",
"role": "Lead Developer"
},
{
"name": "Nick Cernis",
"email": "nick@cern.is",
"homepage": "http://modernnerd.net",
"role": "Original Author"
}
],
"description": "An HTML-to-markdown conversion helper for PHP",
"homepage": "https://github.com/thephpleague/html-to-markdown",
"keywords": [
"html",
"markdown"
]
}
]
# Change Log
All notable changes to this project will be documented in this file.
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [Unreleased][unreleased]
## [4.4.1]
### Fixed
- Fixed autolinking of invalid URLs (#129)
## [4.4.0]
### Added
- Added `hard_break` configuration option (#112, #115)
- The `HtmlConverter` can now be instantiated with an `Environment` (#118)
### Fixed
- 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)
## [4.3.1]
### Changed
- Revised the sanitization implementation (#109)
### Fixed
- 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)
## [4.3.0]
### Added
- Added full support for PHP 7.0 and 7.1
### Changed
- Changed `<pre>` and `<pre><code>` conversions to use backticks instead of indendation (#102)
### Fixed
- 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)
## [4.2.2]
### Fixed
- Fixed sanitization bug which sometimes removes desired content (#63, #101)
## [4.2.1]
### Fixed
- Fixed path to autoload.php when used as a library (#98)
- Fixed edge case for tags containing only whitespace (#99)
### Removed
- Removed double HTML entity decoding, as this is not desireable (#60)
## [4.2.0]
### Added
- Added the ability to invoke HtmlConverter objects as functions (#85)
### Fixed
- Fixed improper handling of nested list items (#19 and #84)
- Fixed preceeding or trailing spaces within emphasis tags (#83)
## [4.1.1]
### Fixed
- Fixed conversion of empty paragraphs (#78)
- Fixed `preg_replace` so it wouldn't break UTF-8 characters (#79)
## [4.1.0]
### Added
- Added `bin/html-to-markdown` script
### Changed
- Changed default italic character to `_` (#58)
## [4.0.1]
### Fixed
- Added escaping to avoid * and _ in a text being rendered as emphasis (#48)
### Removed
- Removed the demo (#51)
- `.styleci.yml` and `CONTRIBUTING.md` are no longer included in distributions (#50)
## [4.0.0]
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
- Added new `HtmlConverter::getEnvironment()` method to expose the `Environment` (#42, #43)
### Changed
- Changed `Environment::addConverter()` from `protected` to `public`, enabling custom converters to be added (#42, #43)
- Changed `HtmlConverter::createDOMDocument()` from `protected` to `private`
- Changed `Element::nextCached` from `protected` to `private`
- Made the `Environment` class `final`
## [3.1.1]
### Fixed
- Empty HTML strings now result in empty Markdown documents (#40, #41)
## [3.1.0]
### Added
- Added new `equals` method to `Element` to check for equality
### Changes
- Use Linux line endings consistently instead of plaform-specific line endings (#36)
### Fixed
- Cleaned up code style
## [3.0.0]
### Changed
- 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)
## [2.2.2]
### Added
- Added support for PHP 5.6 and HHVM
- Enabled testing against PHP 7 nightlies
- Added this CHANGELOG.md