Aryeh Gregor wrote:
> https://bugzilla.wikimedia.org/show_bug.cgi?id=4484
> 
> That should do what you want.

Yes, this might be the equivalent of "{{<substonly>subst:</substonly>".

That RFE has been around for years, and I was aware of it. The problem is,
interactions between two different kinds of markup parsing (<> and {{}})
are often unpredictable, and have changed.

In the beginning, {{subst:# didn't work.  It does now?

Having thought about such issues on more than one occasion, I'm proposing
clean markup that's easier and predictably parsable, and fits well with
current practices and syntax:

   {{#   function (existing)
   {{##  substitute-only subst:, otherwise is transclude {{
   {{### substitute-only subst: for function, otherwise is {{#

Obviously, a lot easier to document and for editors to type!

And I've given it a cute neologism.


> This is also worth considering:
> 
> https://bugzilla.wikimedia.org/show_bug.cgi?id=5453
> 
> If {{<includeonly>subst:</includeonly>foo}} worked as {{foo}} on
> transclusion and {{subst:foo}} on substitution, that would also
> accomplish what you want (eliminating the need for the subst=subst:).
> 
But it doesn't (or didn't) and it's already used as a hack, for example:

{{#ifeq:{{NAMESPACE}}|{{<includeonly>subst:</includeonly>NAMESPACE}}
|
| {{error:not substituted|cfd}}
}}

To be honest, I'm not sure how that even works, but it does....

Obviously, <nosubst> would handle that more elegantly.

Should <substonly> and <nosubst> become standard, we could use them.

NB:I'd prefer <substituteonly> and <nosubstitute>, spelled out like include.

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to