Created
April 21, 2012 07:48
-
-
Save chobie/2435371 to your computer and use it in GitHub Desktop.
KwattroMarkdownBundle patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Tests/Markdown/KwattroMarkdownTest.php b/Tests/Markdown/KwattroMarkdownTest.php | |
index e21b152..0162ec2 100644 | |
--- a/Tests/Markdown/KwattroMarkdownTest.php | |
+++ b/Tests/Markdown/KwattroMarkdownTest.php | |
@@ -64,12 +64,12 @@ class KwattroMarkdownTest extends \PHPUnit_Framework_TestCase | |
$md = new Markdown(array(), array(), 'html'); | |
$link = "hello_world_man"; | |
$expected = '<p>'.$link.'</p>'."\n"; | |
- //$this->assertEquals($expected, $md->render($link, array('no_intraemphasis' => true))); | |
+ //$this->assertEquals($expected, $md->render($link, array('no_intra_emphasis' => true))); | |
} | |
public function testWithBaseSundownClasses() | |
{ | |
- $md = new \Sundown\Markdown(\Sundown\Render\HTML,array("no_intraemphasis"=>true)); | |
+ $md = new \Sundown\Markdown(\Sundown\Render\HTML,array("no_intra_emphasis"=>true)); | |
$txt = "hello_world hello_world"; | |
$exp = '<p>'.$txt.'</p>'."\n"; | |
$this->assertEquals($exp, $md->render($txt)); | |
@@ -115,4 +115,4 @@ next line is empty</p> | |
$this->assertEquals($expected, $md->render($link, array('autolink' => false))); | |
} | |
-} | |
\ No newline at end of file | |
+} | |
diff --git a/Tests/Markdown/Syntax/HeadersTest.php b/Tests/Markdown/Syntax/HeadersTest.php | |
index 3fc6074..9284463 100644 | |
--- a/Tests/Markdown/Syntax/HeadersTest.php | |
+++ b/Tests/Markdown/Syntax/HeadersTest.php | |
@@ -99,7 +99,7 @@ Level2 title | |
$md = $this->getMarkdown(); | |
$text = '#Level'; | |
$markdown = $md->render($text); | |
- $expected = '#Level'."\n"; | |
+ $expected = '<p>#Level</p>'."\n"; | |
$this->assertEquals($expected, $markdown); | |
} | |
@@ -137,4 +137,4 @@ This is some text'; | |
<p>This is some text</p>'."\n"; | |
$this->assertEquals($expected, $markdown); | |
} | |
-} | |
\ No newline at end of file | |
+} | |
diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php | |
index 8a764ea..c8cdf62 100644 | |
--- a/Tests/bootstrap.php | |
+++ b/Tests/bootstrap.php | |
@@ -1,25 +1,4 @@ | |
<?php | |
- | |
$libDir = __DIR__.'/..'; | |
$vendorDir = $libDir.'/vendor'; | |
-require_once $vendorDir.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; | |
- | |
-use Symfony\Component\ClassLoader\UniversalClassLoader; | |
- | |
-$loader = new UniversalClassLoader(); | |
-$loader->registerPrefixes(array( | |
- 'Twig_' => $vendorDir.'/twig/lib', | |
-)); | |
-$loader->register(); | |
- | |
-spl_autoload_register(function($class) | |
-{ | |
- $path = __DIR__; | |
- if (0 === strpos($class, 'Kwattro\\MarkdownBundle\\')) { | |
- $path = implode('/', array_slice(explode('\\', $class), 2)).'.php'; | |
- require_once __DIR__.'/../'.$path; | |
- return true; | |
- } | |
-}); | |
- | |
-?> | |
\ No newline at end of file | |
+require $vendorDir . "/.composer/autoload.php"; | |
diff --git a/composer.json b/composer.json | |
index 490a739..de697af 100644 | |
--- a/composer.json | |
+++ b/composer.json | |
@@ -12,10 +12,11 @@ | |
], | |
"require": { | |
"symfony/framework-bundle": "2.*", | |
- "symfony/twig-bundle": "*" | |
+ "symfony/twig-bundle": "*", | |
+ "twig/twig": "1.6" | |
}, | |
"autoload": { | |
"psr-0": { "Kwattro\\MarkdownBundle": "" } | |
}, | |
"target-dir": "Kwattro/MarkdownBundle" | |
-} | |
\ No newline at end of file | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment