mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Escaping pipes in the code of table elements
ref. https://github.github.com/gfm/#example-200
This commit is contained in:
@@ -69,9 +69,9 @@ sign) of operands.
|
||||
| `OP_EXCEPT` | `B` | `R(a) = exc` |
|
||||
| `OP_RESCUE` | `BB` | `R(b) = R(a).isa?(R(b))` |
|
||||
| `OP_RAISEIF` | `B` | `raise(R(a)) if R(a)` |
|
||||
| `OP_SSEND` | `BBB` | `R(a) = self.send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n|k<<4)` |
|
||||
| `OP_SSEND` | `BBB` | `R(a) = self.send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n\|k<<4)` |
|
||||
| `OP_SSENDB` | `BBB` | `R(a) = self.send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..,&R(a+n+2k+1))` |
|
||||
| `OP_SEND` | `BBB` | `R(a) = R(a).send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n|k<<4)` |
|
||||
| `OP_SEND` | `BBB` | `R(a) = R(a).send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n\|k<<4)` |
|
||||
| `OP_SENDB` | `BBB` | `R(a) = R(a).send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..,&R(a+n+2k+1))` |
|
||||
| `OP_CALL` | `-` | `R(0) = self.call(frame.argc, frame.argv)` |
|
||||
| `OP_SUPER` | `BB` | `R(a) = super(R(a+1),... ,R(a+b+1))` |
|
||||
|
||||
@@ -34,6 +34,7 @@ module MRuby
|
||||
cmt.sub!(/\s*#.*/, "")
|
||||
cmt.sub!(/\b(?=L_\w+\b)/, "OP_")
|
||||
cmt.gsub!(/\b(Irep|Pool|R|Syms)\[([^\[\]]+)\]/, "\\1(\\2)")
|
||||
cmt.gsub!(/[\\\|]/) { |m| "\\#{m}" } # Ruby-2.5 is not support "Numbered block parameter"
|
||||
end
|
||||
spec = opspecs[opr] or raise "unknown operand type: #{opr}"
|
||||
item = format(%(| %-18s | %-14s | %-58s |\n), "`OP_#{ins}`", "`#{spec[:modified] || opr}`", cmt && "`#{cmt}`")
|
||||
|
||||
Reference in New Issue
Block a user