Last modified: 2012-05-17 05:46:37 UTC
Created attachment 9838 [details] Add support for templates without replacements in jqueryMsg The template parser in jqueryMsg expect a replacement after the templatename as per the syntax templateContents = twr:templateWithReplacement p:templateParam* { return twr.concat(p) } / t:templateName p:templateParam* { return p.length ? [ t, p ] : [ t ] } templateWithReplacement = t:templateName ":" r:replacement { return [ t, r ] } replacement = '$' digits:digits { return [ 'REPLACE', parseInt( digits, 10 ) - 1 ] } This fails for {{GRAMMAR:genitive|{{SITENAME}}}} since genitive is not a replacement or not starting with a $. (grammar is yet to be supported by the parser.) Attached patch resolves this by adding an option to templateContents like this: templateContents = twr:templateWithReplacement p:templateParam* { return twr.concat(p) } / twr:templateWithOutReplacement p:templateParam* { return twr.concat(p) } / t:templateName p:templateParam* { return p.length ? [ t, p ] : [ t ] } (Did not commit this code and keeping patch here since core code is in 'slush' )
r111629 merged this patch to jsgrammar branch
jsgrammar branch was merged sometime back. closing this bug.