summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuil Rusev <hello@erusev.com>2015-04-24 08:24:06 +0300
committerEmanuil Rusev <hello@erusev.com>2015-04-24 08:24:06 +0300
commit31c8856f53f041390595dd2fc92b8bd8bcb2bab7 (patch)
tree29f783f567dab71938415579bb289494ed12df12
parentd5823ad6221ac7d3895d03b3f9f770cfaa22f44a (diff)
parent6736ba9a047710c03a58197183fba4c4a3db94bd (diff)
downloadparsedown-31c8856f53f041390595dd2fc92b8bd8bcb2bab7.zip
parsedown-31c8856f53f041390595dd2fc92b8bd8bcb2bab7.tar.gz
parsedown-31c8856f53f041390595dd2fc92b8bd8bcb2bab7.tar.bz2
Merge pull request #312 from garoevans/patch-1
Fix check against $matches
-rwxr-xr-xParsedown.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parsedown.php b/Parsedown.php
index 9bdae22..87c10a6 100755
--- a/Parsedown.php
+++ b/Parsedown.php
@@ -1212,7 +1212,7 @@ class Parsedown
{
if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches))
{
- $definition = $matches[1] ? $matches[1] : $Element['text'];
+ $definition = strlen($matches[1]) ? $matches[1] : $Element['text'];
$definition = strtolower($definition);
$extent += strlen($matches[0]);