In studio, it would be really nice (for documentation) if these collapsible arrows would interact with the comment blocks. Instead, they collapse but without change to the format. This makes it difficult to navigate through code which is heavily documented (as exampled in the image)
--[[
@function PullUserGroupsAndCompareToDepartments
@author unix_system
@date 14/03/2019
@params:
(integer) userId [The user Id of the person you want to pull groups on]
@returns:
([string]) UserGroups [The groups (tuple) available to the user. Format:
{[GroupId] = {Name = "123",...}}
@purpose:
This function will pull all the user's groups, and compare that list to the list of Department Applications.
It's designed to cut down the number of GetRankInGroup requests by just doing a lump check at the start.
N.B. This probably caches. So assume heavy yield.
@usage: local GroupTable = PullUserGroupsAndCompareToDepartments(Player.userId)
--]]
The last two collapsible arrows donât actually appear as a comment minimiser/expander; they appear because of your inclusion of the word âfunctionâ in your comment. The arrow is added as the editor is attempting to allow to you minimise the contents of the âfunctionâ (when there isnât really any function at all).
It wouldnât be expected for these arrows to change the comment format in any way. In fact, itâd be nice for comments to, instead of providing a dummy arrow, ignore keywords like this altogetherâpossibly worth filing a bug report for this issue itself.
Studioâs script IDE has a lot of bugs when it comes to collapsing code blocks and Iâm not entirely sure why. Even with normal code, itâll sometimes not collapse them even though it should. I think this bug is more or less related to code collapsing itself, rather than being exclusive to comment blocks.
Yea exactly. Seems like it picks up on keywords and certain syntax. It still treats code like it would normally, regardless of commenting. So whatever works in code to collapse will work in comments too.