mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Support {{=}}.
This commit is contained in:
parent
f87709d6bb
commit
835914b2de
Notes:
Gabriel Wicke
2012-03-14 09:07:01 +00:00
|
@ -718,7 +718,8 @@ tplarg_or_template
|
|||
)
|
||||
|
||||
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 @@ tplarg
|
|||
|
||||
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 @@ template_param_name
|
|||
/ & { 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
|
||||
|
|
Loading…
Reference in a new issue