https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113801
Revision: 113801
Author: gwicke
Date: 2012-03-14 09:07:01 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
Support {{=}}.
Modified Paths:
--------------
trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt
Modified: trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt
===================================================================
--- trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt
2012-03-14 08:34:38 UTC (rev 113800)
+++ trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt
2012-03-14 09:07:01 UTC (rev 113801)
@@ -718,7 +718,8 @@
)
template
- = "{{" (newline / space)* target:template_param_text
+ = "{{" (newline / space)*
+ target:template_name
params:(( newline / space )* pipe
r:( &pipe { return new KV( '', '') } // empty argument
/ ( newline / space )* p:template_param { return p }
@@ -754,7 +755,7 @@
template_param
= name:template_param_name
- // Insanity: MW accepts |foo | = bar as a single param..
+ // Insanity: MW accepts |foo | = bar | as a single param..
(pipe (space / newline)* &'=')?
val:(
s0:space*
@@ -794,6 +795,8 @@
/ & { return stops.pop( 'equal' ) }
//= h:( !"}}" x:([^=|\n]) { return x } )* { return h.join(''); }
+template_name = template_param_value
+
template_param_value
= & { return stops.push( 'equal', false ) }
tpt:template_param_text
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs