Skip to content

Commit 8b21544

Browse files
committed
Removed unnecessary groups
1 parent 3ab13d7 commit 8b21544

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ParsedownExtended.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ protected function inlineSmartypants($Excerpt)
10281028

10291029
// ``like this''
10301030
if ('`' === $first && $config->get('smartypants.smart_backticks')) {
1031-
if (preg_match('/^(?:``)(?!\s)([^"\'`]+)(?:\'\')/i', $text, $matches)) {
1031+
if (preg_match('/^``(?!\s)([^"\'`]+)\'\'/i', $text, $matches)) {
10321032
if (strlen(trim($Excerpt['before'])) > 0) {
10331033
return null;
10341034
}
@@ -1044,7 +1044,7 @@ protected function inlineSmartypants($Excerpt)
10441044

10451045
// "like this" or 'like this'
10461046
if (('"' === $first || "'" === $first) && $config->get('smartypants.smart_quotes')) {
1047-
if (preg_match('/^(\")(?!\s)([^\"]+)(?:\")|^(?<!\w)(\')(?!\s)([^\']+)(?:\')/i', $text, $matches)) {
1047+
if (preg_match('/^(\")(?!\s)([^\"]+)\"|^(?<!\w)(\')(?!\s)([^\']+)\'/i', $text, $matches)) {
10481048
if (strlen(trim($Excerpt['before'])) > 0) {
10491049
return null;
10501050
}
@@ -1069,7 +1069,7 @@ protected function inlineSmartypants($Excerpt)
10691069

10701070
// <<like this>>
10711071
if ('<' === $first && $config->get('smartypants.smart_angled_quotes')) {
1072-
if (preg_match('/^(?:<{2})(?!\s)([^<>]+)(?:>{2})/i', $text, $matches)) {
1072+
if (preg_match('/^<{2}(?!\s)([^<>]+)>{2}/i', $text, $matches)) {
10731073
if (strlen(trim($Excerpt['before'])) > 0) {
10741074
return null;
10751075
}

0 commit comments

Comments
 (0)