Method: Mathemagical::LaTeX::Scanner#scan_any
- Defined in:
- lib/mathemagical/latex.rb
#scan_any(remain_space = false) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/mathemagical/latex.rb', line 114 def scan_any(remain_space=false) p = pos scan_space r = remain_space ? matched.to_s : "" case when s = scan_block when s = scan_command else unless _scan(/./) || remain_space self.pos = p return nil end s = matched.to_s end r << s end |