utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
638 stars 46 forks source link

Optimize the logic to generate documentation comment #733

Open DragonKnightOfBreeze opened 2 weeks ago

DragonKnightOfBreeze commented 2 weeks ago

image

  1. line break in kotlin doc should use 2 line break character ('\n'), as same as in markdown
  2. special handing logic for basic type references is required (e.g., [int], may convert to [Int])
  3. annotation references are not converted (e.g., [annotation @GDScript.@export])
  4. replace [codeblock]..[/codeblock] to markdown codefence format, it's missing
  5. missing imports for references (e.g., [Signal.emit] in Object.kt)
chippmann commented 4 days ago

@piiertho i think i handled most if not all of these cases in the old doc gen when we still manually parsed the docs from the xml files. Maybe some of it can be salvaged for these fixes here? IIRC these sanitizing steps i did were independent of the xml data