1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Compare commits

..

7 Commits

Author SHA1 Message Date
7d4c06cb52 Bump version 2019-03-17 17:19:07 +00:00
f7b66e6b20 Merge pull request #701 from aidantwoods/fix/spaces-in-class-names-1.8.x-beta
[1.8.x-beta] Fix spaces in class names
2019-03-17 17:10:10 +00:00
811bc32726 Fix test platforms 2019-03-17 17:04:25 +00:00
8fd5464c46 [1.8.x-beta] Fix spaces in class names 2019-03-17 17:01:52 +00:00
c26a2ee4bf Bump beta version 2018-06-11 19:15:32 +01:00
ba3b60d6e4 Merge pull request #641 from aidantwoods/fix/api-stability-complete-function-removal
Restore existence of protected API methods
2018-06-08 14:38:42 +01:00
0b1e6b8c86 Restore existence of protected API methods 2018-06-07 19:47:09 +01:00
2 changed files with 27 additions and 5 deletions

View File

@ -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

View File

@ -17,7 +17,7 @@ class Parsedown
{
# ~
const version = '1.8.0-beta-4';
const version = '1.8.0-beta-6';
# ~
@ -391,6 +391,11 @@ class Parsedown
}
}
protected function blockCodeComplete($Block)
{
return $Block;
}
#
# Comment
@ -464,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(
@ -508,6 +527,11 @@ class Parsedown
return $Block;
}
protected function blockFencedCodeComplete($Block)
{
return $Block;
}
#
# Header