From 8fd5464c46ddb778e65a53d60f72e06f7f7e5329 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Sun, 17 Mar 2019 16:53:17 +0000 Subject: [PATCH 1/4] [1.8.x-beta] Fix spaces in class names --- Parsedown.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index 9008a89..37e3645 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -469,7 +469,21 @@ class Parsedown if ($infostring !== '') { - $Element['attributes'] = array('class' => "language-$infostring"); + /** + * https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes + * Every HTML element may have a class attribute specified. + * The attribute, if specified, must have a value that is a set + * of space-separated tokens representing the various classes + * that the element belongs to. + * [...] + * The space characters, for the purposes of this specification, + * are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), + * U+000A LINE FEED (LF), U+000C FORM FEED (FF), and + * U+000D CARRIAGE RETURN (CR). + */ + $language = substr($infostring, 0, strcspn($infostring, " \t\n\f\r")); + + $Element['attributes'] = array('class' => "language-$language"); } $Block = array( From 811bc327268733ff751c7495b8f3933ad364ce18 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Sun, 17 Mar 2019 17:03:54 +0000 Subject: [PATCH 2/4] Fix test platforms --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5382fe..7a8ba35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,13 +13,11 @@ matrix: - php: 7.0 - php: 7.1 - php: 7.2 + - php: 7.3 - php: nightly - - php: hhvm - - php: hhvm-nightly fast_finish: true allow_failures: - php: nightly - - php: hhvm-nightly install: - composer install --prefer-dist --no-interaction --no-progress From 7d4c06cb520cca6d0c5a381eaa15bb5576593682 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Sun, 17 Mar 2019 17:19:07 +0000 Subject: [PATCH 3/4] Bump version --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index 37e3645..093261e 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -17,7 +17,7 @@ class Parsedown { # ~ - const version = '1.8.0-beta-5'; + const version = '1.8.0-beta-6'; # ~ From fe7a50eceb4a3c867cc9fa9c0aa906b1067d1955 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Sun, 17 Mar 2019 18:47:21 +0000 Subject: [PATCH 4/4] New release due to mislabeled previous tag --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index 093261e..46974ff 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -17,7 +17,7 @@ class Parsedown { # ~ - const version = '1.8.0-beta-6'; + const version = '1.8.0-beta-7'; # ~