- * @copyright 2004-2018 Michel Fortin
+ * @copyright 2004-2021 Michel Fortin
* @copyright (Original Markdown) 2004-2006 John Gruber
*/
diff --git a/serendipity_event_markdown/lib/Readme.md b/serendipity_event_markdown/lib/Readme.md
index c05cd93d..7c576655 100644
--- a/serendipity_event_markdown/lib/Readme.md
+++ b/serendipity_event_markdown/lib/Readme.md
@@ -1,7 +1,9 @@
PHP Markdown
============
-PHP Markdown Lib 1.8.0 - 14 Jan 2018
+![ci.yml](https://github.com/michelf/php-markdown/actions/workflows/ci.yml/badge.svg)
+
+PHP Markdown Lib 1.9.0 - 1 Dec 2019
by Michel Fortin
@@ -34,15 +36,14 @@ program by John Gruber.
Requirement
-----------
-This library package requires PHP 5.3 or later.
+This library package requires PHP 7.4 or later.
Note: The older plugin/library hybrid package for PHP Markdown and
PHP Markdown Extra is no longer maintained but will work with PHP 4.0.5 and
later.
-Before PHP 5.3.7, pcre.backtrack_limit defaults to 100 000, which is too small
-in many situations. You might need to set it to higher values. Later PHP
-releases defaults to 1 000 000, which is usually fine.
+You might need to set pcre.backtrack_limit higher than 1 000 000
+(the default), though the default is usually fine.
Usage
@@ -163,26 +164,54 @@ potential side effects, and future extensibility -- before deciding on
acceptance or rejection.
If you make a pull request that includes changes to the parser please add
-tests for what is being changed to [MDTest][] and make a pull request there
-too.
+tests for what is being changed to the `test/` directory. This can be as
+simple as adding a `.text` (input) file with a corresponding `.xhtml`
+(output) file to proper category under `./test/resources/`.
- [MDTest]: https://github.com/michelf/mdtest/
+Traditionally tests were in a separate repository, [MDTest](https://github.com/michelf/mdtest)
+but they are now located here, alongside the source code.
Donations
---------
If you wish to make a donation that will help me devote more time to
-PHP Markdown, please visit [michelf.ca/donate] or send Bitcoin to
-[1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH].
+PHP Markdown, please visit [michelf.ca/donate].
[michelf.ca/donate]: https://michelf.ca/donate/#!Thanks%20for%20PHP%20Markdown
- [1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH]: bitcoin:1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH
Version History
---------------
+PHP Markdown Lib 1.9.0 (1 Dec 2019)
+
+* Added `fn_backlink_label` configuration variable to put some text in the
+ `aria-label` attribute.
+ (Thanks to Sunny Walker for the implementation.)
+
+* Occurances of "`^^`" in `fn_backlink_html`, `fn_backlink_class`,
+ `fn_backlink_title`, and `fn_backlink_label` will be replaced by the
+ corresponding footnote number in the HTML output. Occurances of "`%%`" will be
+ replaced by a number for the reference (footnotes can have multiple references).
+ (Thanks to Sunny Walker for the implementation.)
+
+* Added configuration variable `omit_footnotes`. When `true` footnotes are not
+ appended at the end of the generated HTML and the `footnotes_assembled`
+ variable will contain the HTML for the footnote list, allowing footnotes to be
+ moved somewhere else on the page.
+ (Thanks to James K. for the implementation.)
+
+ Note: when placing the content of `footnotes_assembled` on the page, consider
+ adding the attribute `role="doc-endnotes"` to the `` or `` that will
+ enclose the list of footnotes so they are reachable to accessibility tools the
+ same way they would be with the default HTML output.
+
+* Fixed deprecation warnings from PHP about usage of curly braces to access
+ characters in text strings.
+ (Thanks to Remi Collet and Frans-Willem Post.)
+
+
PHP Markdown Lib 1.8.0 (14 Jan 2018)
* Autoloading with Composer now uses PSR-4.
@@ -371,7 +400,7 @@ Copyright and License
---------------------
PHP Markdown Lib
-Copyright (c) 2004-2016 Michel Fortin
+Copyright (c) 2004-2019 Michel Fortin
All rights reserved.
diff --git a/serendipity_event_markdown/lib/Readme.php b/serendipity_event_markdown/lib/Readme.php
index e473d733..726bbe3d 100644
--- a/serendipity_event_markdown/lib/Readme.php
+++ b/serendipity_event_markdown/lib/Readme.php
@@ -9,7 +9,7 @@ spl_autoload_register(function($class){
require str_replace('\\', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
});
// If using Composer, use this instead:
-//require 'vendor/autoloader.php';
+//require 'vendor/autoload.php';
// Get Markdown class
use Michelf\Markdown;
@@ -21,13 +21,13 @@ $html = Markdown::defaultTransform($text);
?>
-
- PHP Markdown Lib - Readme
-
-
+
+ PHP Markdown Lib - Readme
+
+
-
+
diff --git a/serendipity_event_markdown/lib/composer.json b/serendipity_event_markdown/lib/composer.json
index 6b1993d6..dd7b42d9 100644
--- a/serendipity_event_markdown/lib/composer.json
+++ b/serendipity_event_markdown/lib/composer.json
@@ -18,9 +18,27 @@
}
],
"require": {
- "php": ">=5.3.0"
+ "php": ">=7.4"
},
"autoload": {
"psr-4": { "Michelf\\": "Michelf/" }
+ },
+ "require-dev": {
+ "phpspec/prophecy": "^1.6",
+ "friendsofphp/php-cs-fixer": "^3.0",
+ "phpunit/phpunit": "^9.5",
+ "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan-phpunit": "^1.0"
+ },
+
+ "scripts": {
+ "tests": "vendor/bin/phpunit test/",
+ "phpstan": [
+ "vendor/bin/phpstan analyse Michelf/ --level=5",
+ "vendor/bin/phpstan analyse -c test/phpstan.neon test/ --level=5"
+ ],
+ "codestyle": "vendor/bin/php-cs-fixer fix Michelf --dry-run --verbose --show-progress=none",
+ "codestyle-fix": "vendor/bin/php-cs-fixer fix Michelf"
}
+
}
diff --git a/serendipity_event_markdown/serendipity_event_markdown.php b/serendipity_event_markdown/serendipity_event_markdown.php
index cec58be0..8a15903c 100644
--- a/serendipity_event_markdown/serendipity_event_markdown.php
+++ b/serendipity_event_markdown/serendipity_event_markdown.php
@@ -23,9 +23,9 @@ class serendipity_event_markdown extends serendipity_event
$propbag->add('requirements', array(
'serendipity' => '0.7',
'smarty' => '2.6.7',
- 'php' => '5.3.0'
+ 'php' => '7.4.0'
));
- $propbag->add('version', '1.30.1');
+ $propbag->add('version', '1.31');
$propbag->add('cachable_events', array('frontend_display' => true));
$propbag->add('event_hooks', array(
'frontend_display' => true,