Skip to content

tools: make v doc -f md module output useful by default#24737

Merged
spytheman merged 2 commits into
vlang:masterfrom
gechandesu:vdoc_fix_md
Jun 17, 2025
Merged

tools: make v doc -f md module output useful by default#24737
spytheman merged 2 commits into
vlang:masterfrom
gechandesu:vdoc_fix_md

Conversation

@gechandesu

Copy link
Copy Markdown
Contributor

This PR makes autogenerated markdown docs useful.

Before this PR v doc -f md module without -comments produces useless docs without function signatures, struct bodies, etc and actual docstrings. There is no -comments flag needed anymore for getting normal docs.

There is example before and after output.

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-23113

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman

Copy link
Copy Markdown
Contributor

I wonder if it should include the readme as well?
Currently passing -readme forces an error:

vdoc: Including README.md for doc generation is supported on HTML output, or when running directly in the terminal.

... but perhaps it may be possible to just include the content of the readme in the output too, without any further conversion (like the HTML backend does).

@spytheman spytheman merged commit e7905ea into vlang:master Jun 17, 2025
26 checks passed
@gechandesu gechandesu deleted the vdoc_fix_md branch June 17, 2025 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants