Skip to content

Instantly share code, notes, and snippets.

Created November 8, 2014 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d84518ba8a06dcea0bb5 to your computer and use it in GitHub Desktop.
Save anonymous/d84518ba8a06dcea0bb5 to your computer and use it in GitHub Desktop.
diff --git a/tests/parsers/ShortcodeParserTest.php b/tests/parsers/ShortcodeParserTest.php
index 1ab935a..28d5145 100644
--- a/tests/parsers/ShortcodeParserTest.php
+++ b/tests/parsers/ShortcodeParserTest.php
@@ -219,6 +219,12 @@ class ShortcodeParserTest extends SapphireTest {
$this->assertEquals($this->extra['element']->tagName, 'a');
}
+ public function testPreserveWhitespace() {
+ $before = " [not_shortcode]\n [not_shortcode]\n";
+ $after = ShortcodeParser::get('default')->parse($before);
+ $this->assertEquals($before, $after);
+ }
+
// -----------------------------------------------------------------------------------------------------------------
/**
@camfindlay
Copy link

Thanks for this, would be good if you added to framework with a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment