dnault/therapi-runtime-javadoc

Parameter lists in @Link are not parsed properly

bbottema opened this issue · 4 comments

Parameter lists (ie {@link ClassName#someMethod(String, Integer) label}), are not parsed properly, resulting in a member of "someMethod(String, " and a label of ", Integer) label" or sometinhg similar.

Member parameter lists should be parsed properly. At the same time, it would be good if the parameter list was stored on Link as an array instead of a single string.

I implemented the following regex to completely parse all the (optional) parts of a @link:

^(?<classname>[\w\.]+)?(?:#(?<member>\w+))?(?:\((?<params>.*)\))?(?:\s(?<label>\w+(?:\s\w+)*))?$

See it working on regex101: https://regex101.com/r/IvCACP/3 (note: only leave one line in the test area that you want to test, there's some issue with multi-lines in the tester)

Any chance you will include this in a release soon, @dnault? I'm stuck on a SNAPSHOT I built on my laptop and I just found out on a different location I am missing that snapshot in my local repo :P It's all ready in the pull request

Sure, will review and try to get a release out shortly. Thanks for this!

@bbottema Version 0.8.0 is released, should be available in Maven Central shortly (10 to 30 minutes, usually)