Permalink
Browse files

Kill wayward whitespace

  • Loading branch information...
1 parent f0ae040 commit 8f2ec055500b31bcb772b16d587c451043b38593 @netcarver committed Oct 28, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −1 src/Netcarver/Textile/Parser.php
  2. +0 −1 test/fixtures/basic.yaml
View
2 src/Netcarver/Textile/Parser.php
@@ -1822,7 +1822,7 @@ protected function doPBr($in)
protected function fPBr($m)
{
- $tmp = preg_replace("~<br\s*/?>\s*\n(?![\s|])~i", "\n", $m[3]); // Normalise <br/>\n(not space or |) -> \n(not space or |)
+ $tmp = preg_replace("~<br\s*/?>\s*\n(?![\s|])~i", "\n", $m[3]); // Normalise <br/>\n(not space or |) -> \n(not space or |)
$content = preg_replace("/\n(?![\s|])/", '<br />', $tmp); // then \n(not space or |) -> <br />
return '<'.$m[1].$m[2].'>'.$content.$m[4];
}
View
1 test/fixtures/basic.yaml
@@ -9,7 +9,6 @@ options:
adaptor_options:
restricted: false
-
hasRawText() tag case insensitivity & closure:
note: Although xhtml calls for lower-case tag names with all tags closed (even on void elements), Textile doesn't care if xhtml in its input is well formed, it just has to output it verbatim. Therefore we use the more relaxed HTML5 rules (allowing for mixed case element names) for detecting 'raw' input text. In addition, xhtml allows void tags to be closed like normal tags (so <hr></hr> is valid in xhtml) and Textile should let these through untouched too.
input: |

0 comments on commit 8f2ec05

Please sign in to comment.