diff --git a/CHANGELOG.md b/CHANGELOG.md
index a807881..2d81124 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ Version 1.2.1 work in progress
------------------------------
- Improved handling of inline HTML with URL and email tags.
+- Improved handling of custom syntax with `[[`, references should not use `[` as the first character in the reference name.
Version 1.2.0 on 14. Mar. 2018
------------------------------
diff --git a/MarkdownExtra.php b/MarkdownExtra.php
index c6866d3..eedcf77 100644
--- a/MarkdownExtra.php
+++ b/MarkdownExtra.php
@@ -69,7 +69,7 @@ class MarkdownExtra extends Markdown
protected function identifyReference($line)
{
- return ($line[0] === ' ' || $line[0] === '[') && preg_match('/^ {0,3}\[(.+?)\]:\s*([^\s]+?)(?:\s+[\'"](.+?)[\'"])?\s*('.$this->_specialAttributesRegex.')?\s*$/', $line);
+ return ($line[0] === ' ' || $line[0] === '[') && preg_match('/^ {0,3}\[[^\[](.*?)\]:\s*([^\s]+?)(?:\s+[\'"](.+?)[\'"])?\s*('.$this->_specialAttributesRegex.')?\s*$/', $line);
}
/**
diff --git a/inline/LinkTrait.php b/inline/LinkTrait.php
index bf79b3a..bb6c45f 100644
--- a/inline/LinkTrait.php
+++ b/inline/LinkTrait.php
@@ -254,7 +254,7 @@ protected function renderImage($block)
protected function identifyReference($line)
{
- return isset($line[0]) && ($line[0] === ' ' || $line[0] === '[') && preg_match('/^ {0,3}\[(.+?)\]:\s*([^\s]+?)(?:\s+[\'"](.+?)[\'"])?\s*$/', $line);
+ return isset($line[0]) && ($line[0] === ' ' || $line[0] === '[') && preg_match('/^ {0,3}\[[^\[](.*?)\]:\s*([^\s]+?)(?:\s+[\'"](.+?)[\'"])?\s*$/', $line);
}
/**
diff --git a/tests/markdown-data/list_items_with_undefined_ref.html b/tests/markdown-data/list_items_with_undefined_ref.html
index 53ea8df..6cd231f 100644
--- a/tests/markdown-data/list_items_with_undefined_ref.html
+++ b/tests/markdown-data/list_items_with_undefined_ref.html
@@ -8,3 +8,7 @@
it to use by setting its db
property.