Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix foldstyle option #1804

Merged
merged 2 commits into from
Mar 23, 2024

Conversation

bouzidanas
Copy link
Contributor

Quick fix for foldStyle option in IAceOptions

Note: I checked to make sure there isnt some additional logic before this option is passed to ace.editor.setOptions that would justify it taking a boolean instead of what setOptions accepts for foldStyle ( one of the following: "markbegin" | "markbeginend" | "manual" ).

Changes:

Documentation:

  • No need to change documentation

References:

Should not take boolean. Should be one of the following: "markbegin" | "markbeginend" | "manual"
The foldStyle option under IAceOptions takes in boolean when it should take in on of the following: "markbegin" | "markbeginend" | "manual";

Please note that these options get passed directly to ace.editor.setOptions function, so all thats needed to fix an option is to change the option in the type.ts, type.d.ts and type.js files.
@khanguslee
Copy link

In fact, passing in boolean as the fold style would cause an error. See https://github.com/ajaxorg/ace/blob/master/src/edit_session/folding.js#L682-L704

@securingsincity securingsincity merged commit f3f5b19 into securingsincity:main Mar 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

foldStyle type error
3 participants