diff --git a/GithubMarkdown.php b/GithubMarkdown.php
index 23c9d1a..bc9e73d 100644
--- a/GithubMarkdown.php
+++ b/GithubMarkdown.php
@@ -71,7 +71,8 @@ protected function consumeParagraph($lines, $current)
$this->identifyFencedCode($line, $lines, $i) ||
$this->identifyUl($line, $lines, $i) ||
$this->identifyOl($line, $lines, $i) ||
- $this->identifyHr($line, $lines, $i)
+ $this->identifyHr($line, $lines, $i) ||
+ $this->identifyHtml($line, $lines, $i)
)
|| $this->identifyHeadline($line, $lines, $i))
{
diff --git a/Markdown.php b/Markdown.php
index 32c9b0f..a369ea0 100644
--- a/Markdown.php
+++ b/Markdown.php
@@ -92,9 +92,17 @@ protected function consumeParagraph($lines, $current)
break;
}
- if ($line === '' || ltrim($line) === '' || $this->identifyHeadline($line, $lines, $i)) {
+ if (
+ $line === '' ||
+ ltrim($line) === '' ||
+ !ctype_alpha($line[0]) && (
+ $this->identifyQuote($line, $lines, $i) ||
+ $this->identifyHr($line, $lines, $i) ||
+ $this->identifyHtml($line, $lines, $i)
+ )
+ || $this->identifyHeadline($line, $lines, $i)) {
break;
- } elseif ($line[0] === "\t" || $line[0] === " " && strncmp($line, ' ', 4) === 0) {
+ } elseif ($this->identifyCode($line, $lines, $i)) {
// possible beginning of a code block
// but check for continued inline HTML
// e.g. changelog 2
paragraph
++quote
+
paragraph
+paragraph
+paragraph
++quote
+
paragraph
+paragraph
+Here is an image tag: .
This is not an image: ![[ :-)
This is not an image: ![[ :-)]]