Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: davidpersson/markup
base: e838bae851
...
head fork: davidpersson/markup
compare: 0a72c4b6e7
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 11 additions and 9 deletions.
  1. +11 −1 bootstrap.php
  2. +0 −4 src/Markdown.php
  3. +0 −4 tests/unit/MarkdownTest.php
12 bootstrap.php
View
@@ -13,8 +13,18 @@
*/
spl_autoload_register(function($class) {
+ $irregular = array(
+ 'MarkdownExtra_Parser' => 'lib/markdown_extra',
+ 'SmartyPants_Parser' => 'lib/smartypants.php',
+ 'MarkdownExtraExtended_Parser' => 'lib/markdown_extra_extended.php'
+ );
+ if (isset($irregular[$class])) {
+ require __DIR__ . '/' . $irregular[$class];
+ return;
+ }
+
if (strpos($class, 'markup') === false) {
- return false;
+ return;
}
$name = str_replace('markup\\', '', $class);
$name = str_replace('\\', '/', $name);
4 src/Markdown.php
View
@@ -14,10 +14,6 @@
namespace markup;
-require_once dirname(__DIR__) . '/lib/markdown_extra.php';
-require_once dirname(__DIR__) . '/lib/smartypants.php';
-require_once dirname(__DIR__) . '/lib/markdown_extra_extended.php';
-
use MarkdownExtra_Parser;
use SmartyPants_Parser;
use MarkdownExtraExtended_Parser;
4 tests/unit/MarkdownTest.php
View
@@ -20,20 +20,16 @@ class MarkdownTest extends \PHPUnit_Framework_TestCase {
public function testGfm() {
// Not touch single underscores inside words
- /*
$data = "foo_bar";
$result = Markdown::gfm($data);
$expected = "foo_bar";
$this->assertEquals($expected, $result);
- */
// Not touch underscores in code blocks
- /*
$data = " foo_bar_baz";
$result = Markdown::gfm($data);
$expected = " foo_bar_baz";
$this->assertEquals($expected, $result);
- */
// Not treat pre blocks with pre-text differently
/*

No commit comments for this range

Something went wrong with that request. Please try again.