Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379267 )
Change subject: Update grammar to yield the results in the examples ...................................................................... Update grammar to yield the results in the examples Change-Id: I5c546e8b80cd7668dce5867b5cabd7940765410e --- M Specification.md M TemplateDataBlob.php 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData refs/changes/67/379267/1 diff --git a/Specification.md b/Specification.md index f0c3821..5e2e2e5 100644 --- a/Specification.md +++ b/Specification.md @@ -284,8 +284,8 @@ A format string describes how whitespace should be added to a template instantiation in wikitext. A format string looks like `{{_|_=_}}`, with optional whitespace and extended underscores. Formally, its structure is given by the following grammar: ``` FormatString = StartFormat ParameterFormat EndFormat -StartFormat = nl? "{{" ws* Hole ws* -ParameterFormat = nl? "|" nl? ws* Hole ws* "=" ws* Hole +StartFormat = nl? "{{" ws* Hole +ParameterFormat = nl? ws* "|" nl? ws* Hole ws* "=" ws* Hole EndFormat = nl? ws* "}}" nl? Hole = "_"+ ws = " " diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index e06bcd8..c024802 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -172,7 +172,7 @@ $data->format; if ( !is_string( $f ) || - !preg_match( '/^\n?\{\{ *_+ *\n?\|\n? *_+ *= *_+\n? *\}\}\n?$/', $f ) + !preg_match( '/^\n?\{\{ *_+\n? *\|\n? *_+ *= *_+\n? *\}\}\n?$/', $f ) ) { return Status::newFatal( 'templatedata-invalid-format', -- To view, visit https://gerrit.wikimedia.org/r/379267 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c546e8b80cd7668dce5867b5cabd7940765410e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: master Gerrit-Owner: Arlolra <abrea...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits