| 146 } |
146 } |
| 147 |
147 |
| 148 impl<W : Write + 'static> ChainRule<W> for CommandName<W> { |
148 impl<W : Write + 'static> ChainRule<W> for CommandName<W> { |
| 149 fn consume(mut self : Box<Self>, c : char, ctx : &Context) -> AnyChainRule<W> { |
149 fn consume(mut self : Box<Self>, c : char, ctx : &Context) -> AnyChainRule<W> { |
| 150 match c { |
150 match c { |
| 151 '}' | '{' | '\\' if self.command.len() <= 1 => { |
151 '}' | '{' | '\\' | '%' if self.command.len() <= 1 => { |
| 152 self.command.push(c); |
152 self.command.push(c); |
| 153 self.handle(ctx) |
153 self.handle(ctx) |
| 154 }, |
154 }, |
| 155 c if c.is_alphanumeric() => { |
155 c if c.is_alphanumeric() => { |
| 156 self.command.push(c); |
156 self.command.push(c); |