From ca8cf1a38647b1319bc5a08a753209219173e9d2 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 5 Jun 2012 15:19:27 +0100 Subject: [PATCH] Simplified wiki link CamelCase regexp Removed rule that made `AAaaa` be a wikilink --- core/modules/parsers/newwikitextparser/rules/wikilink.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/modules/parsers/newwikitextparser/rules/wikilink.js b/core/modules/parsers/newwikitextparser/rules/wikilink.js index 99b9ebbd1..ee65332cc 100644 --- a/core/modules/parsers/newwikitextparser/rules/wikilink.js +++ b/core/modules/parsers/newwikitextparser/rules/wikilink.js @@ -24,12 +24,10 @@ var textPrimitives = { }; textPrimitives.unWikiLink = "~"; -textPrimitives.wikiLink = "(?:(?:" + textPrimitives.upperLetter + "+" + +textPrimitives.wikiLink = textPrimitives.upperLetter + "+" + textPrimitives.lowerLetter + "+" + textPrimitives.upperLetter + - textPrimitives.anyLetter + "*)|(?:" + - textPrimitives.upperLetter + "{2,}" + - textPrimitives.lowerLetter + "+))"; + textPrimitives.anyLetter + "*"; exports.regExpString = textPrimitives.unWikiLink + "?" + textPrimitives.wikiLink;