chitralverma opened a new issue, #9372:
URL: https://github.com/apache/opendal/issues/9372

   *Drafted with AI assistance (Claude Code, Claude Opus 5.5); the author is 
accountable for it.*
   
   ### Feature Description
   
   Keep the structure of core doc comments (nested lists, code blocks, 
headings) when generators copy them into binding docs.
   
   ### Problem and Solution
   
   - **Indentation is trimmed.** The shared parser trims every doc line 
([`doc_lines`, 
options.rs#L179](https://github.com/apache/opendal/blob/33f8c4c8b/dev/src/generate/options.rs#L179)).
 #9368 rebuilds one level of list indentation in the C/Go generator 
(`indent_lists`), which covers today's `ListOptions`, `StatOptions`, and 
`DeleteOptions`. Nested items and code blocks are still lost. For example, 
`WriteOptions::append` has nested items 
([options.rs#L686-L688](https://github.com/apache/opendal/blob/33f8c4c8b/core/core/src/types/options.rs#L686-L688))
 that would flatten into siblings of their parent. Other generators that use 
`doc_lines` have the same problem.
   - **Go headings are not rendered.** In Go, `# Groups` in the `WithListFn` 
doc 
([options.go#L30](https://github.com/apache/opendal/blob/33f8c4c8b/bindings/go/options.go#L30))
 is not followed by a blank line, so `go doc` shows it as literal text instead 
of a heading.
   
   Proposed fix:
   1. Have `doc_lines` keep the relative indentation.
   2. Have each binding re-indent lists and code blocks in its own doc syntax, 
which replaces the C/Go-only `indent_lists`.
   3. Emit a blank line after Markdown headings for Go.
   
   ### Additional Context
   
   Related: #9334 (shared doc post-processor). The bare error-kind rewrite in 
#9368 (any code span equal to an `ErrorKind` name, such as `Conflict`) could 
move into that shared translator, so that it only applies where core means the 
error kind.
   
   Found during an internal review of #9368. Tracker: #9320.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to