Or is the recommendation to just move the exported function up to the main module?
Yeah, that’s currently the only way. However, you can always just declare the (public) functions with function func1 end in the main module and then implement the methods in the submodule. I.e.
module MyModule
export func1
function func1 end
module InternalMod
import ..MyModule: func1
"""
func1()
"""
function func1()
return 1
end
end
end
Just a small design philosophy note: Documenter tries to accurately reflect the code in this situation. If a function is defined in MyModule.InternalMod, then Documenter should state that. A feature that would allow you to fudge that information seems counterproductive to me. I think that a slight reorganization of the code is the cleaner solution.