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

Compare commits

...

10 Commits
1.6.1 ... 1.6.2

Author SHA1 Message Date
1bf24f7334 add kbd to text-level elements 2017-03-29 19:04:15 +03:00
0a09d5ad45 update tests to reflect changes in phpunit 6.0 2017-03-23 20:21:18 +02:00
3fc442b078 Merge pull request #484 from hkdobrev/patch-1
Add Symfony demo to "Who uses it?"
2017-03-10 09:41:24 +02:00
bd0e31a7dd Add Symfony demo to "Who uses it?"
409a65b373/composer.json (L24)
2017-03-10 01:04:53 +02:00
dfaf03639a Merge pull request #480 from pjona/patch-1
Removed double semicolon
2017-03-08 23:21:03 +02:00
7081afe8cb Removed double semicolon 2017-03-02 12:43:51 +01:00
4b6493999a Merge pull request #465 from aidantwoods/patch-8
Trim surrounding whitespace from URL in inlineLink
2017-01-23 09:45:19 +02:00
0172d779d7 Trim surrounding whitespace from URL in inlineLink
Fixes https://github.com/erusev/parsedown-extra/issues/103
2017-01-21 11:06:41 +00:00
cc5b38ca39 Merge pull request #459 from gene-sis/fix_inlineLink_regex
fix_inlineLink_regex
2017-01-07 16:51:03 +02:00
48351504de adjust two regex pattern within inlineLink() to reduce backtracking
add test with base64 image
2017-01-07 00:45:38 +01:00
7 changed files with 21 additions and 14 deletions

View File

@ -448,7 +448,7 @@ class Parsedown
return $Block; return $Block;
} }
$Block['element']['text']['text'] .= "\n".$Line['body'];; $Block['element']['text']['text'] .= "\n".$Line['body'];
return $Block; return $Block;
} }
@ -1204,7 +1204,7 @@ class Parsedown
$remainder = $Excerpt['text']; $remainder = $Excerpt['text'];
if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches)) if (preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches))
{ {
$Element['text'] = $matches[1]; $Element['text'] = $matches[1];
@ -1217,7 +1217,7 @@ class Parsedown
return; return;
} }
if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches)) if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches))
{ {
$Element['attributes']['href'] = $matches[1]; $Element['attributes']['href'] = $matches[1];
@ -1539,10 +1539,10 @@ class Parsedown
'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing',
'i', 'rp', 'del', 'code', 'strike', 'marquee', 'i', 'rp', 'del', 'code', 'strike', 'marquee',
'q', 'rt', 'ins', 'font', 'strong', 'q', 'rt', 'ins', 'font', 'strong',
's', 'tt', 'sub', 'mark', 's', 'tt', 'kbd', 'mark',
'u', 'xm', 'sup', 'nobr', 'u', 'xm', 'sub', 'nobr',
'var', 'ruby', 'sup', 'ruby',
'wbr', 'span', 'var', 'span',
'time', 'wbr', 'time',
); );
} }

View File

@ -49,7 +49,7 @@ It passes most of the CommonMark tests. Most of the tests that don't pass deal w
**Who uses it?** **Who uses it?**
[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://packagist.org/packages/erusev/parsedown/dependents). [phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/), [Symfony demo](https://github.com/symfony/symfony-demo) and [more](https://packagist.org/packages/erusev/parsedown/dependents).
**How can I help?** **How can I help?**

View File

@ -8,7 +8,7 @@
* @link http://commonmark.org/ CommonMark * @link http://commonmark.org/ CommonMark
* @link http://git.io/8WtRvQ JavaScript test runner * @link http://git.io/8WtRvQ JavaScript test runner
*/ */
class CommonMarkTest extends PHPUnit_Framework_TestCase class CommonMarkTest extends \PHPUnit\Framework\TestCase
{ {
const SPEC_URL = 'https://raw.githubusercontent.com/jgm/stmd/master/spec.txt'; const SPEC_URL = 'https://raw.githubusercontent.com/jgm/stmd/master/spec.txt';

View File

@ -1,6 +1,6 @@
<?php <?php
class ParsedownTest extends PHPUnit_Framework_TestCase class ParsedownTest extends \PHPUnit\Framework\TestCase
{ {
final function __construct($name = null, array $data = array(), $dataName = '') final function __construct($name = null, array $data = array(), $dataName = '')
{ {

View File

@ -1,3 +1,7 @@
<?php <?php
include 'Parsedown.php'; include 'Parsedown.php';
if ( ! class_exists('\PHPUnit\Framework\TestCase') && class_exists('\PHPUnit_Framework_TestCase')) {
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long