Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed an issue with recognising block hashes in formParagraphs.

  • Loading branch information...
commit 03c564f11fc7cc5099f0194bd48ad8cc1314c32e 1 parent bb0cc19
@michelf authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 markdown.php
View
4 markdown.php
@@ -2316,7 +2316,7 @@ function formParagraphs($text) {
# $text - string to process with html <p> tags
#
# Strip leading and trailing lines:
- $text = preg_replace('/\A\n+/|/\n+\z/', '', $text);
+ $text = preg_replace('/\A\n+|\n+\z/', '', $text);
$grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY);
@@ -2328,7 +2328,7 @@ function formParagraphs($text) {
# Check if this should be enclosed in a paragraph.
# Clean tag hashes & block tag hashes are left alone.
- $is_p = !preg_match('/^(B|C)\x1A[0-9]+\1$/', $value);
+ $is_p = !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value);
if ($is_p) {
$value = "<p>$value</p>";
Please sign in to comment.
Something went wrong with that request. Please try again.