Index: trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt |
— | — | @@ -854,13 +854,18 @@ |
855 | 855 | } |
856 | 856 | |
857 | 857 | template_param |
858 | | - = name:template_param_name space* |
859 | | - value:( s0:"=" s1:space* |
860 | | - //& { console.warn( 'entering value' ); return true } |
861 | | - s2:template_param_text { return [s0, s1, s2] } )? { |
| 858 | + = name:template_param_name |
| 859 | + s0:space* |
| 860 | + eq:"="? |
| 861 | + s1:space* |
| 862 | + value:template_param_text? |
| 863 | + |
| 864 | + { |
862 | 865 | //console.warn( 'named template_param matched' + pp([name, value ]) ); |
863 | 866 | if ( value !== '' ) { |
864 | | - return new KV(name, flatten( value[2] ) || []); |
| 867 | + return new KV( name, flatten( value ) ); |
| 868 | + } else if ( eq !== '' ) { |
| 869 | + return new KV(flatten( name ), []); |
865 | 870 | } else { |
866 | 871 | return new KV([], flatten(name)); |
867 | 872 | } |
— | — | @@ -1107,7 +1112,7 @@ |
1108 | 1113 | |
1109 | 1114 | generic_attribute_name |
1110 | 1115 | = & { return setFlag( 'equal' ) } |
1111 | | - ! '/' |
| 1116 | + ! '/>' |
1112 | 1117 | name:attribute_preprocessor_text_line |
1113 | 1118 | { |
1114 | 1119 | clearFlag( 'equal' ); |