Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix duplication in toc #19726

Merged
merged 1 commit into from Nov 2, 2023

Conversation

danieldaeschle
Copy link
Member

@danieldaeschle danieldaeschle commented Nov 1, 2023

馃 Generated by Copilot at 7bf893f

Fix a bug in HTML documentation sidebar generation. Use an array to store and check used module prefixes instead of a single variable in cmd/tools/vdoc/html.v.

馃 Generated by Copilot at 7bf893f

  • Fix bug in HTML nav sidebar generation (link)

Comment on lines +215 to +216
names := dc.head.name.split('.')
submod_prefix := if names.len > 1 { names[0] } else { dc.head.name }
Copy link
Member

@ttytm ttytm Nov 2, 2023

Choose a reason for hiding this comment

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

With the names array this could be

	names := dc.head.name.split('.')
	submod_prefix := names[0] or { dc.head.name }

Or even simpler

	submod_prefix := dc.head.name.all_before('.')

cmd/tools/vdoc/html.v Show resolved Hide resolved
@medvednikov medvednikov merged commit 1e80e47 into vlang:master Nov 2, 2023
42 checks passed
@danieldaeschle danieldaeschle deleted the fix-duplicated-vdoc branch November 2, 2023 13:01
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.

None yet

4 participants