From 5bb6ed98ea0b7eb9719d9ec183bd14b131688f77 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 13 Mar 2007 18:09:20 +0000 Subject: [PATCH] Ignore lonely wiki text '''''. Fix a parser test. --- RELEASE-NOTES | 1 + includes/Parser.php | 3 ++- maintenance/parserTests.txt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 795c1a4087..c29fa0db5a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -266,6 +266,7 @@ lighter making things easier to read. * (bug 1196) Add IPv6 support to blocks * Make Special:Listusers caseinsensitive for first letter * Default tidy.conf has been moved from extensions module into includes. +* Ignore lonely ''''' == Languages updated == diff --git a/includes/Parser.php b/includes/Parser.php index 14d45bd3de..b5f984c636 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1285,7 +1285,8 @@ class Parser $output .= ''; if ($state == 'bi') $output .= ''; - if ($state == 'both') + # There might be lonely ''''', so make sure we have a buffer + if ($state == 'both' && $buffer) $output .= ''.$buffer.''; return $output; } diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 4ddaac243b..1e862d162f 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -5770,7 +5770,7 @@ Handling of in URLs !!end !! test -TODO: 5 quotes, code coverage +1 line +5 quotes, code coverage +1 line !! input ''''' !! result -- 2.20.1