File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,12 @@ annotation.
222222If no value is passed to the annotation then the parser will become the default parser for the method return type.
223223You may also pass a suggestion provider name to the annotation to bind the parser to a specific suggestion provider.
224224
225- The signature of the method must be exactly:
225+ The parameter list is flexible (see the
226+ {{ javadoc("https://javadoc.io/doc/org.incendo/cloud-annotations/latest/org/incendo/cloud/annotations/parser/Parser.html ", "JavaDoc", False) }}
227+ ) but the parser _ must_ return the type you wish to parse. The parser will be
228+ registered to the [ parser registry] ( ../core/index.md#parser-registry ) .
229+
230+ Example:
226231
227232``` java
228233// Named parser: @Parser("parserName")
Original file line number Diff line number Diff line change @@ -32,14 +32,16 @@ def dependency_listing(name: str, version: str = None) -> str:
3232 """ .format (name = name , version = env .variables .version [version ])
3333
3434 @env .macro
35- def javadoc (link : str , title : str = None ) -> str :
35+ def javadoc (link : str , title : str = None , code : bool = True ) -> str :
3636 if title is None :
3737 split = link .split ("/" )
3838 title = split [len (split ) - 1 ].replace (".html" , "" )
3939 if link .startswith ("<" ):
4040 link = link [1 : len (link ) - 1 ]
41+ if code :
42+ title = f'`{ title } `'
4143
42- return '[` {title}` ](<{link}> "Click to open the JavaDoc")' .format (link = link , title = title )
44+ return '[{title}](<{link}> "Click to open the JavaDoc")' .format (link = link , title = title )
4345
4446 @env .macro
4547 def snippet (path : str , section : str = "snippet" , title : str = None , indent = 0 ) -> str :
You can’t perform that action at this time.
0 commit comments