Skip to content

Fix Docs Example Formatting #7992

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
merged 2 commits into from
Jul 7, 2025

Conversation

APickledWalrus
Copy link
Member

Problem

When using the @Example annotation, text blocks (multiline strings) are not properly formatted:
image

Solution

This PR rewrites how the combined examples string is formatted. The existing replace calls were not working correctly nor do they appear to be necessary. I removed them. Tabs are already handled later on in the code, and replacing them with spaces would not actually work (would need to be nbsp)

Additionally, an extra blank line is inserted between different @Examples for clarity on the docs.

Testing Completed

I manually generated the docs and confirmed the issue was resolved:
image

Supporting Information


Completes: #7813
Related: none

@APickledWalrus APickledWalrus added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jul 2, 2025
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Jul 2, 2025
@APickledWalrus APickledWalrus linked an issue Jul 2, 2025 that may be closed by this pull request
1 task
@APickledWalrus APickledWalrus moved this to In Review in 2.12 Releases Jul 2, 2025
@skriptlang-automation skriptlang-automation bot added feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. and removed needs reviews A PR that needs additional reviews labels Jul 2, 2025
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.12 Releases Jul 3, 2025
@APickledWalrus APickledWalrus merged commit ecc0002 into dev/feature Jul 7, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done in 2.12 Releases Jul 7, 2025
@APickledWalrus APickledWalrus deleted the patch/docs-example-formatting branch July 7, 2025 14:37
@skriptlang-automation skriptlang-automation bot added completed The issue has been fully resolved and the change will be in the next Skript update. and removed feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. labels Jul 7, 2025
Burbulinis pushed a commit to Burbulinis/Skript that referenced this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
Status: Done - Released
Development

Successfully merging this pull request may close these issues.

Docs don't correctly use example annotation
4 participants