Skip to content

move code comment to callout #12536

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

mojavelinux
Copy link
Contributor

Code comments should be placed in callouts, especially when they contain formatting and links. Otherwise, it breaks the layout of the page, as you can see in this code listing:

screenshot

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 13, 2023
@rwinch
Copy link
Member

rwinch commented Jan 13, 2023

Thanks for finding and fixing this one. Is there a way for this to work as a comment. Part of the reason we do it in comments is to ensure copy / pasted code still has the information in it.

@mojavelinux
Copy link
Contributor Author

mojavelinux commented Jan 13, 2023 via email

@mojavelinux
Copy link
Contributor Author

In theory, it would be possible to have the copy button include the content from the callout list, similar to how the code modifies the copy content for a folded code block. But if there is still a preference to have the comment directly in the code, I would strongly advise to have it just be plain text. The link and formatting isn't going to get picked up on a copy anyway.

@jzheaux jzheaux added in: docs An issue in Documentation or samples type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 17, 2023
@rwinch rwinch merged commit c47fbf7 into spring-projects:main Jan 18, 2023
@rwinch
Copy link
Member

rwinch commented Jan 18, 2023

Sorry for the confusion. Somehow I missed that antora markup was being used in the code comment. I think this makes sense and have merged it.

@rwinch rwinch added this to the 6.1.0-M2 milestone Jan 18, 2023
@mojavelinux mojavelinux deleted the move-code-comment-to-callout branch January 18, 2023 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants