{@code method} causes runtime error when running --api-export
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
as2api |
Fix Committed
|
Undecided
|
David Holroyd |
Bug Description
Error output:
===================
./output/
from ./doc_comment.
from ./doc_comment.
from ./doc_comment.
from ./output/
from ./output/
from (eval):3:in `api_description'
from ./output/
from ./xmlwriter.
... 69 levels...
from ./ui/cli.rb:414
from C:/Ruby/
from C:/Ruby/
from as2api.rb:1
AS2 Code comment
=======
/**
* Register a listener with a given target ({@link Dispatcher} client, i.e. an event dispatcher) for an event of a
* given type. Listeners are identified and managed according to the {@code method} and {@code instance} arguments.
...
This works when outputting the normal HTML API reference, but throws the error when generating XML.
Here's a potential fix, I respectfully submit.
PATCH diff/api_ serializer. rb ======= ======= ======= ======= ======= ======= ======= ======= ==== diff/api_ serializer. rb (revision 381) diff/api_ serializer. rb (working copy) link_tag( inline) code_tag( inline) code_tag( code)
==============
Index: lib/output/
=======
--- lib/output/
+++ lib/output/
@@ -213,6 +213,8 @@
pcdata(inline)
when LinkTag
serialize_
+ when CodeTag
+ serialize_
else
raise "unhandled inline #{inline.inspect}"
end
@@ -218,6 +220,11 @@
end
end
end
+
+ def serialize_
+ attrs = {}
+ api_code(code.text, attrs)
+ end
def serialize_ link_tag( link)
attrs = {}