VisualEditor: Transclusions editor should have a special mode for Parser Function and Magic Word calls


Parser function syntax is generally {{#function_name : expr1 | expr2 | expr3 | ...}}

Currently VE sees this as a template with name "#function_name : expr1" and arguments "1 = expr2", "2 = expr3", etc. This makes it impossible to edit expr1 in VE.

Same for parserfunctions like urlencode: If the template editor cannot handle these then it shouldn't present an editor for it.

Version: unspecified
Severity: enhancement
See Also:

bzimport set Reference to bz50855.
TheDJ created this task.Via LegacyJul 6 2013, 9:49 AM
Jdforrester-WMF added a comment.Via ConduitJul 7 2013, 1:32 AM

Yes, we need a special form of editing transclusions which aren't templates; I can't recall whether Parsoid gives us sufficient information to recognise these as different except for introspection.

NicoV added a comment.Via ConduitJul 10 2013, 2:16 PM

Many of the parser functions are rarely used in the main namespace (#if, ...), but some of them are really important even in the main namespace. For example {{formatnum:...}} is probably used a lot there.

Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebNov 24 2014, 1:29 AM
Jdforrester-WMF lowered the priority of this task from "High" to "Normal".Via WebJan 9 2015, 10:55 PM
Ricordisamoa added a subscriber: Ricordisamoa.Via WebApr 2 2015, 3:41 PM
Thryduulf added a subscriber: Thryduulf.Via WebThu, Jun 25, 7:16 PM
Thryduulf added a comment.Via WebThu, Jun 25, 7:22 PM

If Parsoid doesn't automatically tell VE whether something is a template or not, could it not be done by looking at the format of the string (e.g. {{# is never a template) or comparing it to a list of parser functions?

Add Comment