Trying to generate Kotlin documentation with example code. I really like the @sample tag since I can easily ensure that the samples also compile and are not getting forgotten and outdated.
However I cannot get irregular function names to work. Is this somehow supported, like in the following snippet?
Copy code
/**
* @sample `How to create an Avro file`
*
*/
fun `How to create an Avro file`() {
... sample code ...
}
m
Marcin Aman
05/19/2021, 12:59 PM
I think you can’t. At least i haven’t seen this kind of syntax, which is quite unfortunate
p
Peter
05/19/2021, 1:21 PM
Thanks. I guess that means at least for the time being back to:
Copy code
fun How_to_create_an_Avro_file() ...
m
Marcin Aman
05/19/2021, 1:42 PM
Yes, we will be creating a proper specification for kdoc in the future, so this will be one of the discussed topics